Home
last modified time | relevance | path

Searched refs:ttl (Results 1 – 25 of 69) sorted by relevance

123

/net/netfilter/
Dxt_hl.c31 const u8 ttl = ip_hdr(skb)->ttl; in ttl_mt() local
35 return ttl == info->ttl; in ttl_mt()
37 return ttl != info->ttl; in ttl_mt()
39 return ttl < info->ttl; in ttl_mt()
41 return ttl > info->ttl; in ttl_mt()
Dxt_HL.c42 new_ttl = info->ttl; in ttl_tg()
45 new_ttl = iph->ttl + info->ttl; in ttl_tg()
50 new_ttl = iph->ttl - info->ttl; in ttl_tg()
55 new_ttl = iph->ttl; in ttl_tg()
59 if (new_ttl != iph->ttl) { in ttl_tg()
60 csum_replace2(&iph->check, htons(iph->ttl << 8), in ttl_tg()
62 iph->ttl = new_ttl; in ttl_tg()
112 if (info->mode != IPT_TTL_SET && info->ttl == 0) in ttl_tg_check()
Dxt_recent.c74 u_int8_t ttl; member
130 u_int8_t ttl) in recent_entry_lookup() argument
143 (ttl == e->ttl || ttl == 0 || e->ttl == 0)) in recent_entry_lookup()
184 u_int16_t family, u_int8_t ttl) in recent_entry_init() argument
200 e->ttl = ttl; in recent_entry_init()
253 u_int8_t ttl; in recent_mt() local
264 ttl = iph->ttl; in recent_mt()
273 ttl = iph->hop_limit; in recent_mt()
278 ttl++; in recent_mt()
286 (info->check_set & XT_RECENT_TTL) ? ttl : 0); in recent_mt()
[all …]
Dxt_osf.c170 if (info->ttl == XT_OSF_TTL_TRUE) in xt_osf_ttl()
171 return ip->ttl == f_ttl; in xt_osf_ttl()
172 if (info->ttl == XT_OSF_TTL_NOCHECK) in xt_osf_ttl()
174 else if (ip->ttl <= f_ttl) in xt_osf_ttl()
182 ret = (ip->ttl == f_ttl); in xt_osf_ttl()
192 return ip->ttl == f_ttl; in xt_osf_ttl()
245 if (totlen != f->ss || !xt_osf_ttl(skb, info, f->ttl)) in xt_osf_match_packet()
343 f->ttl - ip->ttl); in xt_osf_match_packet()
/net/batman-adv/
Dpacket.h218 u8 ttl; member
251 u8 ttl; member
274 u8 ttl; member
301 u8 ttl; member
336 u8 ttl; member
375 u8 ttl; member
403 u8 ttl; member
433 u8 ttl; member
464 u8 ttl; member
Dbat_iv_ogm.c337 batadv_ogm_packet->ttl = 2; in batadv_iv_ogm_iface_enable()
392 batadv_ogm_packet->ttl = BATADV_TTL; in batadv_iv_ogm_primary_iface_set()
488 batadv_ogm_packet->tq, batadv_ogm_packet->ttl, in batadv_iv_ogm_send_to_if()
617 batadv_ogm_packet->ttl != 1 && in batadv_iv_ogm_can_aggregate()
632 new_bat_ogm_packet->ttl == 1 && in batadv_iv_ogm_can_aggregate()
851 if (batadv_ogm_packet->ttl <= 1) { in batadv_iv_ogm_forward()
871 batadv_ogm_packet->ttl--; in batadv_iv_ogm_forward()
880 batadv_ogm_packet->tq, batadv_ogm_packet->ttl); in batadv_iv_ogm_forward()
1119 orig_ifinfo->last_ttl = batadv_ogm_packet->ttl; in batadv_iv_ogm_orig_update()
1120 neigh_ifinfo->last_ttl = batadv_ogm_packet->ttl; in batadv_iv_ogm_orig_update()
[all …]
Drouting.c253 icmph->ttl = BATADV_TTL; in batadv_recv_my_icmp_packet()
307 icmp_packet->ttl = BATADV_TTL; in batadv_recv_icmp_ttl_exceeded()
378 if (icmph->ttl < 2) in batadv_recv_icmp_packet()
393 icmph->ttl--; in batadv_recv_icmp_packet()
646 if (unicast_packet->ttl < 2) { in batadv_route_unicast_packet()
664 unicast_packet->ttl--; in batadv_route_unicast_packet()
1130 if (bcast_packet->ttl < 2) in batadv_recv_bcast_packet()
Dnetwork-coding.c762 if (last_ttl != ogm_packet->ttl + 1) in batadv_can_nc_with_orig()
1132 coded_packet->ttl = packet1->ttl; in batadv_nc_code_packets()
1145 coded_packet->second_ttl = packet2->ttl; in batadv_nc_code_packets()
1633 u8 *orig_dest, ttl, ttvn; in batadv_nc_skb_decode_packet() local
1669 ttl = coded_packet_tmp.second_ttl; in batadv_nc_skb_decode_packet()
1673 ttl = coded_packet_tmp.ttl; in batadv_nc_skb_decode_packet()
1700 unicast_packet->ttl = ttl; in batadv_nc_skb_decode_packet()
/net/mac80211/
Dmesh_hwmp.c105 u8 hop_count, u8 ttl, in mesh_path_sel_frame_tx() argument
161 *pos++ = ttl; in mesh_path_sel_frame_tx()
237 u8 ttl, const u8 *target, u32 target_sn, in mesh_path_error_tx() argument
276 *pos++ = ttl; in mesh_path_error_tx()
532 u8 target_flags, ttl, flags; in hwmp_preq_frame_process() local
604 ttl = ifmsh->mshcfg.element_ttl; in hwmp_preq_frame_process()
605 if (ttl != 0) { in hwmp_preq_frame_process()
609 target_sn, mgmt->sa, 0, ttl, in hwmp_preq_frame_process()
621 ttl = PREQ_IE_TTL(preq_elem); in hwmp_preq_frame_process()
623 if (ttl <= 1) { in hwmp_preq_frame_process()
[all …]
/net/mpls/
Dinternal.h10 u8 ttl; member
99 static inline struct mpls_shim_hdr mpls_entry_encode(u32 label, unsigned ttl, unsigned tc, bool bos) in mpls_entry_encode() argument
106 (ttl << MPLS_LS_TTL_SHIFT)); in mpls_entry_encode()
116 result.ttl = (entry & MPLS_LS_TTL_MASK) >> MPLS_LS_TTL_SHIFT; in mpls_entry_decode()
Dmpls_iptunnel.c54 unsigned int ttl; in mpls_output() local
58 ttl = ip_hdr(skb)->ttl; in mpls_output()
61 ttl = ipv6_hdr(skb)->hop_limit; in mpls_output()
104 ttl, 0, bos); in mpls_output()
/net/ipv4/
Dip_tunnel_core.c53 __u8 tos, __u8 ttl, __be16 df, bool xnet) in iptunnel_xmit() argument
79 iph->ttl = ttl; in iptunnel_xmit()
264 tun_info->key.ttl = nla_get_u8(tb[LWTUNNEL_IP_TTL]); in ip_tun_build_state()
289 nla_put_u8(skb, LWTUNNEL_IP_TTL, tun_info->key.ttl) || in ip_tun_fill_encap_info()
359 tun_info->key.ttl = nla_get_u8(tb[LWTUNNEL_IP6_HOPLIMIT]); in ip6_tun_build_state()
384 nla_put_u8(skb, LWTUNNEL_IP6_TC, tun_info->key.ttl) || in ip6_tun_fill_encap_info()
Dah4.c134 top_iph->ttl = iph->ttl; in ah_output_done()
193 iph->ttl = top_iph->ttl; in ah_output()
210 top_iph->ttl = 0; in ah_output()
250 top_iph->ttl = iph->ttl; in ah_output()
384 iph->ttl = 0; in ah_input()
Dip_output.c128 int ttl = inet->uc_ttl; in ip_select_ttl() local
130 if (ttl < 0) in ip_select_ttl()
131 ttl = ip4_dst_hoplimit(dst); in ip_select_ttl()
132 return ttl; in ip_select_ttl()
154 iph->ttl = ip_select_ttl(inet, &rt->dst); in ip_build_and_send_pkt()
341 if (ip_hdr(skb)->ttl == 0) { in ip_mc_output()
452 iph->ttl = ip_select_ttl(inet, &rt->dst); in ip_queue_xmit()
1169 cork->ttl = ipc->ttl; in ip_setup_cork()
1384 __u8 ttl; in __ip_make_skb() local
1423 if (cork->ttl != 0) in __ip_make_skb()
[all …]
Dip_tunnel.c601 u8 tos, ttl; in ip_tunnel_xmit() local
731 ttl = tnl_params->ttl; in ip_tunnel_xmit()
732 if (ttl == 0) { in ip_tunnel_xmit()
734 ttl = inner_iph->ttl; in ip_tunnel_xmit()
737 ttl = ((const struct ipv6hdr *)inner_iph)->hop_limit; in ip_tunnel_xmit()
740 ttl = ip4_dst_hoplimit(&rt->dst); in ip_tunnel_xmit()
756 tos, ttl, df, !net_eq(tunnel->net, dev_net(dev))); in ip_tunnel_xmit()
788 t->parms.iph.ttl = p->iph.ttl; in ip_tunnel_update()
827 if (p->iph.ttl) in ip_tunnel_ioctl()
Dxfrm4_state.c65 XFRM_MODE_SKB_CB(skb)->ttl = iph->ttl; in xfrm4_extract_header()
Dudp_tunnel.c78 __be32 src, __be32 dst, __u8 tos, __u8 ttl, in udp_tunnel_xmit_skb() argument
97 tos, ttl, df, xnet); in udp_tunnel_xmit_skb()
Dipip.c194 if (t->parms.iph.ttl == 0 && type == ICMP_TIME_EXCEEDED) in ipip_err()
358 parms->iph.ttl = nla_get_u8(data[IFLA_IPTUN_TTL]); in ipip_netlink_parms()
359 if (parms->iph.ttl) in ipip_netlink_parms()
479 nla_put_u8(skb, IFLA_IPTUN_TTL, parm->iph.ttl) || in ipip_fill_info()
Dxfrm4_mode_beet.c32 iph->ttl = XFRM_MODE_SKB_CB(skb)->ttl; in xfrm4_beet_make_header()
Dinetpeer.c372 __u32 delta, ttl; in inet_peer_gc() local
376 ttl = 0; /* be aggressive */ in inet_peer_gc()
378 ttl = inet_peer_maxttl in inet_peer_gc()
388 if (delta >= ttl && in inet_peer_gc()
/net/tipc/
Dudp_media.c154 int ttl, err = 0; in tipc_udp_send_msg() local
184 ttl = ip4_dst_hoplimit(&rt->dst); in tipc_udp_send_msg()
187 dst->ipv4.s_addr, 0, ttl, 0, in tipc_udp_send_msg()
210 ttl = ip6_dst_hoplimit(ndst); in tipc_udp_send_msg()
213 &dst->ipv6, 0, ttl, src->udp_port, in tipc_udp_send_msg()
/net/ipv4/netfilter/
Dnf_reject_ipv4.c47 __u8 protocol, int ttl) in nf_reject_iphdr_put() argument
62 niph->ttl = ttl; in nf_reject_iphdr_put()
/net/netfilter/ipvs/
Dip_vs_xmit.c883 __u32 *payload_len, __u8 *dsfield, __u8 *ttl, in ip_vs_prepare_tunneled_skb() argument
913 *ttl = old_ipv6h->hop_limit; in ip_vs_prepare_tunneled_skb()
928 *ttl = old_iph->ttl; in ip_vs_prepare_tunneled_skb()
984 __u8 ttl = 0; in ip_vs_tunnel_xmit() local
1018 &ttl, dfp); in ip_vs_tunnel_xmit()
1044 iph->ttl = ttl; in ip_vs_tunnel_xmit()
1080 __u8 ttl = 0; in ip_vs_tunnel_xmit_v6() local
1111 &dsfield, &ttl, NULL); in ip_vs_tunnel_xmit_v6()
1137 iph->hop_limit = ttl; in ip_vs_tunnel_xmit_v6()
/net/ipv6/
Dsit.c581 if (t->parms.iph.ttl == 0 && type == ICMP_TIME_EXCEEDED) in ipip6_err()
828 u8 ttl; in ipip6_tunnel_xmit() local
980 ttl = tiph->ttl; in ipip6_tunnel_xmit()
981 if (ttl == 0) in ipip6_tunnel_xmit()
982 ttl = iph6->hop_limit; in ipip6_tunnel_xmit()
993 protocol, tos, ttl, df, in ipip6_tunnel_xmit()
1098 t->parms.iph.ttl = p->iph.ttl; in ipip6_tunnel_update()
1208 if (p.iph.ttl) in ipip6_tunnel_ioctl()
1414 iph->ttl = 64; in ipip6_fb_tunnel_init()
1443 parms->iph.ttl = 64; in ipip6_netlink_parms()
[all …]
Dip6_udp_tunnel.c77 __u8 prio, __u8 ttl, __be16 src_port, in udp_tunnel6_xmit_skb() argument
105 ip6h->hop_limit = ttl; in udp_tunnel6_xmit_skb()

123