Home
last modified time | relevance | path

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

1234

/net/netfilter/
Dxt_hl.c28 const u8 ttl = ip_hdr(skb)->ttl; in ttl_mt() local
32 return ttl == info->ttl; in ttl_mt()
34 return ttl != info->ttl; in ttl_mt()
36 return ttl < info->ttl; in ttl_mt()
38 return ttl > info->ttl; in ttl_mt()
Dxt_HL.c39 new_ttl = info->ttl; in ttl_tg()
42 new_ttl = iph->ttl + info->ttl; in ttl_tg()
47 new_ttl = iph->ttl - info->ttl; in ttl_tg()
52 new_ttl = iph->ttl; in ttl_tg()
56 if (new_ttl != iph->ttl) { in ttl_tg()
57 csum_replace2(&iph->check, htons(iph->ttl << 8), in ttl_tg()
59 iph->ttl = new_ttl; in ttl_tg()
107 if (info->mode != IPT_TTL_SET && info->ttl == 0) in ttl_tg_check()
Dnft_osf.c10 u8 ttl; member
47 if (!nf_osf_find(skb, nf_osf_fingers, priv->ttl, &data)) { in nft_osf_eval()
67 u8 ttl; in nft_osf_init() local
73 ttl = nla_get_u8(tb[NFTA_OSF_TTL]); in nft_osf_init()
74 if (ttl > 2) in nft_osf_init()
76 priv->ttl = ttl; in nft_osf_init()
99 if (nla_put_u8(skb, NFTA_OSF_TTL, priv->ttl)) in nft_osf_dump()
148 priv->ttl != osf->ttl) { in nft_osf_reduce()
Dxt_recent.c71 u_int8_t ttl; member
126 u_int8_t ttl) in recent_entry_lookup() argument
139 (ttl == e->ttl || ttl == 0 || e->ttl == 0)) in recent_entry_lookup()
180 u_int16_t family, u_int8_t ttl) in recent_entry_init() argument
195 e->ttl = ttl; in recent_entry_init()
248 u_int8_t ttl; in recent_mt() local
259 ttl = iph->ttl; in recent_mt()
268 ttl = iph->hop_limit; in recent_mt()
274 ttl++; in recent_mt()
282 (info->check_set & XT_RECENT_TTL) ? ttl : 0); in recent_mt()
[all …]
Dnfnetlink_osf.c40 return ip->ttl == f_ttl; in nf_osf_ttl()
43 else if (ip->ttl <= f_ttl) in nf_osf_ttl()
48 ret = (ip->ttl == f_ttl); in nf_osf_ttl()
75 if (ctx->totlen != f->ss || !nf_osf_ttl(skb, ttl_check, f->ttl)) in nf_osf_match_one()
218 ttl_check = (info->flags & NF_OSF_TTL) ? info->ttl : 0; in nf_osf_match()
241 f->ttl - ip->ttl); in nf_osf_match()
/net/xfrm/
Dxfrm_inout.h17 XFRM_MODE_SKB_CB(skb)->ttl = iph->ttl; in xfrm4_extract_header()
32 XFRM_MODE_SKB_CB(skb)->ttl = iph->hop_limit; in xfrm6_extract_header()
52 iph->hop_limit = XFRM_MODE_SKB_CB(skb)->ttl; in xfrm6_beet_make_header()
67 iph->ttl = XFRM_MODE_SKB_CB(skb)->ttl; in xfrm4_beet_make_header()
/net/mac80211/
Dmesh_hwmp.c104 u8 hop_count, u8 ttl, in mesh_path_sel_frame_tx() argument
159 *pos++ = ttl; in mesh_path_sel_frame_tx()
235 u8 ttl, const u8 *target, u32 target_sn, in mesh_path_error_tx() argument
273 *pos++ = ttl; in mesh_path_error_tx()
572 u8 target_flags, ttl, flags; in hwmp_preq_frame_process() local
644 ttl = ifmsh->mshcfg.element_ttl; in hwmp_preq_frame_process()
645 if (ttl != 0) { in hwmp_preq_frame_process()
649 target_sn, mgmt->sa, 0, ttl, in hwmp_preq_frame_process()
661 ttl = PREQ_IE_TTL(preq_elem); in hwmp_preq_frame_process()
663 if (ttl <= 1) { in hwmp_preq_frame_process()
[all …]
/net/mpls/
Dmpls_iptunnel.c52 unsigned int ttl; in mpls_xmit() local
80 ttl = tun_encap_info->default_ttl; in mpls_xmit()
83 ttl = net->mpls.default_ttl; in mpls_xmit()
85 ttl = ip_hdr(skb)->ttl; in mpls_xmit()
89 ttl = tun_encap_info->default_ttl; in mpls_xmit()
92 ttl = net->mpls.default_ttl; in mpls_xmit()
94 ttl = ipv6_hdr(skb)->hop_limit; in mpls_xmit()
129 ttl, 0, bos); in mpls_xmit()
Dinternal.h13 u8 ttl; member
180 result.ttl = (entry & MPLS_LS_TTL_MASK) >> MPLS_LS_TTL_SHIFT; in mpls_entry_decode()
/net/ipv4/
Dip_tunnel.c554 u8 tos, ttl; in ip_md_tunnel_xmit() local
606 ttl = key->ttl; in ip_md_tunnel_xmit()
607 if (ttl == 0) { in ip_md_tunnel_xmit()
609 ttl = inner_iph->ttl; in ip_md_tunnel_xmit()
611 ttl = ((const struct ipv6hdr *)inner_iph)->hop_limit; in ip_md_tunnel_xmit()
613 ttl = ip4_dst_hoplimit(&rt->dst); in ip_md_tunnel_xmit()
624 iptunnel_xmit(NULL, rt, skb, fl4.saddr, fl4.daddr, proto, tos, ttl, in ip_md_tunnel_xmit()
650 u8 tos, ttl; in ip_tunnel_xmit() local
789 ttl = tnl_params->ttl; in ip_tunnel_xmit()
790 if (ttl == 0) { in ip_tunnel_xmit()
[all …]
Dah4.c136 top_iph->ttl = iph->ttl; in ah_output_done()
195 iph->ttl = top_iph->ttl; in ah_output()
212 top_iph->ttl = 0; in ah_output()
252 top_iph->ttl = iph->ttl; in ah_output()
386 iph->ttl = 0; in ah_input()
Dinetpeer.c146 __u32 delta, ttl; in inet_peer_gc() local
154 ttl = 0; /* be aggressive */ in inet_peer_gc()
156 ttl = peer_maxttl - (peer_maxttl - peer_minttl) / HZ * in inet_peer_gc()
166 if (delta < ttl || !refcount_dec_if_one(&p->refcnt)) in inet_peer_gc()
Dip_output.c134 int ttl = inet->uc_ttl; in ip_select_ttl() local
136 if (ttl < 0) in ip_select_ttl()
137 ttl = ip4_dst_hoplimit(dst); in ip_select_ttl()
138 return ttl; in ip_select_ttl()
161 iph->ttl = ip_select_ttl(inet, &rt->dst); in ip_build_and_send_pkt()
401 if (ip_hdr(skb)->ttl == 0) { in ip_mc_output()
514 iph->ttl = ip_select_ttl(inet, &rt->dst); in __ip_queue_xmit()
1300 cork->ttl = ipc->ttl; in ip_setup_cork()
1502 __u8 ttl; in __ip_make_skb() local
1541 if (cork->ttl != 0) in __ip_make_skb()
[all …]
Dip_tunnel_core.c52 __u8 tos, __u8 ttl, __be16 df, bool xnet) in iptunnel_xmit() argument
79 iph->ttl = ttl; in iptunnel_xmit()
238 .ttl = iph->ttl, in iptunnel_pmtud_build_icmp()
703 tun_info->key.ttl = nla_get_u8(tb[LWTUNNEL_IP_TTL]); in ip_tun_build_state()
848 nla_put_u8(skb, LWTUNNEL_IP_TTL, tun_info->key.ttl) || in ip_tun_fill_encap_info()
982 tun_info->key.ttl = nla_get_u8(tb[LWTUNNEL_IP6_HOPLIMIT]); in ip6_tun_build_state()
1010 nla_put_u8(skb, LWTUNNEL_IP6_HOPLIMIT, tun_info->key.ttl) || in ip6_tun_fill_encap_info()
1131 parms->iph.ttl = nla_get_u8(data[IFLA_IPTUN_TTL]); in ip_tunnel_netlink_parms()
1132 if (parms->iph.ttl) in ip_tunnel_netlink_parms()
/net/openvswitch/
Dactions.c470 new_ttl = OVS_MASKED(nh->ttl, new_ttl, mask); in set_ip_ttl()
472 csum_replace2(&nh->check, htons(nh->ttl << 8), htons(new_ttl << 8)); in set_ip_ttl()
473 nh->ttl = new_ttl; in set_ip_ttl()
517 flow_key->ip.ttl = nh->ttl; in set_ipv4()
593 flow_key->ip.ttl = nh->hop_limit; in set_ipv6()
605 u8 ttl; in set_nsh() local
633 ttl = nsh_get_ttl(nh); in set_nsh()
634 ttl = OVS_MASKED(ttl, key.base.ttl, mask.base.ttl); in set_nsh()
635 flow_key->nsh.base.ttl = ttl; in set_nsh()
636 nsh_set_flags_and_ttl(nh, flags, ttl); in set_nsh()
[all …]
/net/batman-adv/
Dbat_v_ogm.c340 ntohl(ogm_packet->throughput), ogm_packet->ttl, in batadv_v_ogm_send_softif()
556 if (ogm_received->ttl <= 1) { in batadv_v_ogm_forward()
579 ogm_forward->ttl--; in batadv_v_ogm_forward()
584 ogm_forward->ttl, if_incoming->net_dev->name); in batadv_v_ogm_forward()
653 orig_ifinfo->last_ttl = ogm2->ttl; in batadv_v_ogm_metric_update()
664 neigh_ifinfo->last_ttl = ogm2->ttl; in batadv_v_ogm_metric_update()
875 ntohl(ogm_packet->seqno), ogm_throughput, ogm_packet->ttl, in batadv_v_ogm_process()
1059 ogm_packet->ttl = BATADV_TTL; in batadv_v_ogm_init()
Dnetwork-coding.c775 if (last_ttl != ogm_packet->ttl + 1) in batadv_can_nc_with_orig()
1147 coded_packet->ttl = packet1->ttl; in batadv_nc_code_packets()
1160 coded_packet->second_ttl = packet2->ttl; in batadv_nc_code_packets()
1644 u8 *orig_dest, ttl, ttvn; in batadv_nc_skb_decode_packet() local
1680 ttl = coded_packet_tmp.second_ttl; in batadv_nc_skb_decode_packet()
1684 ttl = coded_packet_tmp.ttl; in batadv_nc_skb_decode_packet()
1711 unicast_packet->ttl = ttl; in batadv_nc_skb_decode_packet()
Drouting.c247 icmph->ttl = BATADV_TTL; in batadv_recv_my_icmp_packet()
313 icmp_packet->ttl = BATADV_TTL; in batadv_recv_icmp_ttl_exceeded()
396 if (icmph->ttl < 2) in batadv_recv_icmp_packet()
411 icmph->ttl--; in batadv_recv_icmp_packet()
669 if (unicast_packet->ttl < 2) { in batadv_route_unicast_packet()
687 unicast_packet->ttl--; in batadv_route_unicast_packet()
1202 if (bcast_packet->ttl-- < 2) in batadv_recv_bcast_packet()
Dbat_iv_ogm.c216 batadv_ogm_packet->ttl = 2; in batadv_iv_ogm_iface_enable()
270 batadv_ogm_packet->ttl = BATADV_TTL; in batadv_iv_ogm_primary_iface_set()
374 batadv_ogm_packet->tq, batadv_ogm_packet->ttl, in batadv_iv_ogm_send_to_if()
492 batadv_ogm_packet->ttl != 1 && in batadv_iv_ogm_can_aggregate()
507 new_bat_ogm_packet->ttl == 1 && in batadv_iv_ogm_can_aggregate()
693 if (batadv_ogm_packet->ttl <= 1) { in batadv_iv_ogm_forward()
713 batadv_ogm_packet->ttl--; in batadv_iv_ogm_forward()
722 batadv_ogm_packet->tq, batadv_ogm_packet->ttl); in batadv_iv_ogm_forward()
1005 orig_ifinfo->last_ttl = batadv_ogm_packet->ttl; in batadv_iv_ogm_orig_update()
1006 neigh_ifinfo->last_ttl = batadv_ogm_packet->ttl; in batadv_iv_ogm_orig_update()
[all …]
/net/sched/
Dact_tunnel_key.c373 u8 tos, ttl; in tunnel_key_init() local
436 ttl = 0; in tunnel_key_init()
438 ttl = nla_get_u8(tb[TCA_TUNNEL_KEY_ENC_TTL]); in tunnel_key_init()
448 metadata = __ip_tun_set_dst(saddr, daddr, tos, ttl, in tunnel_key_init()
459 metadata = __ipv6_tun_set_dst(&saddr, &daddr, tos, ttl, dst_port, in tunnel_key_init()
754 if (key->ttl && nla_put_u8(skb, TCA_TUNNEL_KEY_ENC_TTL, key->ttl)) in tunnel_key_dump()
/net/netfilter/ipvs/
Dip_vs_xmit.c287 if (ip_hdr(skb)->ttl <= 1) { in decrement_ttl()
949 __u32 *payload_len, __u8 *dsfield, __u8 *ttl, in ip_vs_prepare_tunneled_skb() argument
980 *ttl = old_ipv6h->hop_limit; in ip_vs_prepare_tunneled_skb()
995 *ttl = old_iph->ttl; in ip_vs_prepare_tunneled_skb()
1143 __u8 ttl = 0; in ip_vs_tunnel_xmit() local
1200 &ttl, dfp); in ip_vs_tunnel_xmit()
1259 iph->ttl = ttl; in ip_vs_tunnel_xmit()
1295 __u8 ttl = 0; in ip_vs_tunnel_xmit_v6() local
1349 &dsfield, &ttl, NULL); in ip_vs_tunnel_xmit_v6()
1408 iph->hop_limit = ttl; in ip_vs_tunnel_xmit_v6()
/net/ipv6/
Dip6_udp_tunnel.c80 __u8 prio, __u8 ttl, __be32 label, in udp_tunnel6_xmit_skb() argument
105 ip6h->hop_limit = ttl; in udp_tunnel6_xmit_skb()
Dsit.c591 if (t->parms.iph.ttl == 0 && type == ICMP_TIME_EXCEEDED) in ipip6_err()
869 u8 ttl; in ipip6_tunnel_xmit() local
1022 ttl = tiph->ttl; in ipip6_tunnel_xmit()
1023 if (ttl == 0) in ipip6_tunnel_xmit()
1024 ttl = iph6->hop_limit; in ipip6_tunnel_xmit()
1034 iptunnel_xmit(NULL, rt, skb, fl4.saddr, fl4.daddr, protocol, tos, ttl, in ipip6_tunnel_xmit()
1151 t->parms.iph.ttl = p->iph.ttl; in ipip6_tunnel_update()
1265 if (p->iph.ttl) in __ipip6_tunnel_ioctl_validate()
1476 iph->ttl = 64; in ipip6_fb_tunnel_init()
1505 parms->iph.ttl = 64; in ipip6_netlink_parms()
[all …]
/net/ipv4/netfilter/
Dnf_reject_ipv4.c170 __u8 protocol, int ttl) in nf_reject_iphdr_put() argument
185 niph->ttl = ttl; in nf_reject_iphdr_put()
/net/tipc/
Dudp_media.c172 int ttl, err = 0; in tipc_udp_xmit() local
194 ttl = ip4_dst_hoplimit(&rt->dst); in tipc_udp_xmit()
196 dst->ipv4.s_addr, 0, ttl, 0, src->port, in tipc_udp_xmit()
216 ttl = ip6_dst_hoplimit(ndst); in tipc_udp_xmit()
218 &src->ipv6, &dst->ipv6, 0, ttl, 0, in tipc_udp_xmit()

1234