| /net/ipv4/ |
| A D | fib_semantics.c | 226 if (fi->nh) { in free_fib_info_rcu() 278 if (fi->nh || ofi->nh) in nh_comp() 279 return nexthop_cmp(fi->nh, ofi->nh) ? 0 : -1; in nh_comp() 433 if (!fi->nh || fi->nh->id != cfg->fc_nh_id) in fib_find_info_nh() 508 if (fi->nh) in fib_nlmsg_size() 913 if (fi->nh && cfg->fc_nh_id == fi->nh->id) in fib_nh_match() 1090 netdev_hold(nh->fib_nh_dev, &nh->fib_nh_dev_tracker, in fib_check_nh_v6_gw() 1092 nh->fib_nh_oif = nh->fib_nh_dev->ifindex; in fib_check_nh_v6_gw() 1385 if (!nh) { in fib_create_info() 1425 if (nh) { in fib_create_info() [all …]
|
| A D | nexthop.c | 119 info->nh = kzalloc(sizeof(*info->nh), GFP_KERNEL); in nh_notifier_single_info_init() 292 if (!nh) { in nh_notifier_res_bucket_idle_timer_get() 530 kfree(nh); in nexthop_free_rcu() 539 if (nh) { in nexthop_alloc() 546 return nh; in nexthop_alloc() 2013 struct nexthop *nh = nhge->nh; in remove_nh_grp_entry() local 2042 if (nhg->nh_entries[i].nh == nh) { in remove_nh_grp_entry() 2054 new_nhges[j].nh = nhges[i].nh; in remove_nh_grp_entry() 2707 if (!nh) in nexthop_create_group() 2884 if (!nh) in nexthop_create() [all …]
|
| A D | icmp.c | 1209 int nh; in icmp_rcv() local 1220 nh = skb_network_offset(skb); in icmp_rcv() 1229 skb_set_network_header(skb, nh); in icmp_rcv()
|
| A D | ip_tunnel.c | 382 int nh, err; in ip_tunnel_rcv() local 412 nh = skb_network_header(skb) - skb->head; in ip_tunnel_rcv() 421 iph = (struct iphdr *)(skb->head + nh); in ip_tunnel_rcv()
|
| /net/openvswitch/ |
| A D | actions.c | 422 ofl = nh->flow_lbl[0] << 16 | nh->flow_lbl[1] << 8 | nh->flow_lbl[2]; in set_ipv6_fl() 449 csum_replace2(&nh->check, htons(nh->ttl << 8), htons(new_ttl << 8)); in set_ip_ttl() 450 nh->ttl = new_ttl; in set_ip_ttl() 457 struct iphdr *nh; in set_ipv4() local 466 nh = ip_hdr(skb); in set_ipv4() 476 set_ip_addr(skb, nh, &nh->saddr, new_addr); in set_ipv4() 484 set_ip_addr(skb, nh, &nh->daddr, new_addr); in set_ipv4() 578 struct nshhdr *nh; in set_nsh() local 596 nh = nsh_hdr(skb); in set_nsh() 605 nh = nsh_hdr(skb); in set_nsh() [all …]
|
| A D | flow.c | 391 struct ipv6hdr *nh; in parse_ipv6hdr() local 398 nh = ipv6_hdr(skb); in parse_ipv6hdr() 631 struct nshhdr *nh; in parse_nsh() local 640 nh = nsh_hdr(skb); in parse_nsh() 642 length = nsh_hdr_len(nh); in parse_nsh() 651 nh = nsh_hdr(skb); in parse_nsh() 662 sizeof(nh->md1)); in parse_nsh() 689 struct iphdr *nh; in key_extract_l3l4() local 703 nh = ip_hdr(skb); in key_extract_l3l4() 708 key->ip.tos = nh->tos; in key_extract_l3l4() [all …]
|
| A D | flow_netlink.h | 70 int nsh_hdr_from_nlattr(const struct nlattr *attr, struct nshhdr *nh,
|
| A D | flow_netlink.c | 1309 struct nshhdr *nh, size_t size) in nsh_hdr_from_nlattr() argument 1331 nh->np = base->np; in nsh_hdr_from_nlattr() 1332 nh->mdtype = base->mdtype; in nsh_hdr_from_nlattr() 1333 nh->path_hdr = base->path_hdr; in nsh_hdr_from_nlattr() 1340 memcpy(&nh->md1, nla_data(a), mdlen); in nsh_hdr_from_nlattr() 1347 memcpy(&nh->md2, nla_data(a), mdlen); in nsh_hdr_from_nlattr() 1356 nh->ver_flags_ttl_len = 0; in nsh_hdr_from_nlattr() 1357 nsh_set_flags_ttl_len(nh, flags, ttl, NSH_BASE_HDR_LEN + mdlen); in nsh_hdr_from_nlattr()
|
| /net/mpls/ |
| A D | af_mpls.c | 262 return nh; in mpls_select_multipath() 394 if (!nh) in mpls_forward() 702 nh->nh_dev = dev; in mpls_nh_assign_dev() 776 if (!nh) in mpls_nh_build_from_cfg() 807 if (!nh) in mpls_nh_build() 818 err = nla_get_via(via, &nh->nh_via_alen, &nh->nh_via_table, in mpls_nh_build() 1501 if (!nh->nh_dev || nh->nh_dev == dev) in mpls_ifdown() 2012 nla_put_via(skb, nh->nh_via_table, mpls_nh_via(rt, nh), in mpls_dump_route() 2230 if (nh->nh_dev) in lfib_nlmsg_size() 2447 if (!nh) { in mpls_getroute() [all …]
|
| A D | internal.h | 161 int nhsel; const struct mpls_nh *nh; \ 162 for (nhsel = 0, nh = (rt)->rt_nh; \ 164 nh = (void *)nh + (rt)->rt_nh_size, nhsel++) 167 int nhsel; struct mpls_nh *nh; \ 168 for (nhsel = 0, nh = (rt)->rt_nh; \ 170 nh = (void *)nh + (rt)->rt_nh_size, nhsel++)
|
| /net/ipv6/ |
| A D | route.c | 535 arg->nh = nh; in __rt6_nh_dev_match() 607 nh = nexthop_fib6_nh(f6i->nh); in rt6_device_match() 619 res->nh = nh; in rt6_device_match() 627 res->nh = nh; in rt6_device_match() 819 arg->nh = nh; in rt6_nh_find_match() 864 nh = arg.nh; in __find_rr_leaf() 874 res->nh = nh; in __find_rr_leaf() 1706 struct fib6_nh *nh = res->nh; in rt6_insert_exception() local 3085 arg->res->nh = nh; in fib6_nh_redirect_match() 3885 rt->nh = nh; in ip6_route_info_create_nh() [all …]
|
| A D | exthdrs.c | 136 if (nh[off] == IPV6_TLV_PAD1) { in ip6_parse_tlv() 146 optlen = nh[off + 1] + 2; in ip6_parse_tlv() 150 if (nh[off] == IPV6_TLV_PADN) { in ip6_parse_tlv() 164 if (nh[off + i] != 0) in ip6_parse_tlv() 173 switch (nh[off]) { in ip6_parse_tlv() 199 switch (nh[off]) { in ip6_parse_tlv() 892 if (nh[optoff + 1] == 2) { in ipv6_hop_ra() 898 nh[optoff + 1]); in ipv6_hop_ra() 978 nh[optoff+1]); in ipv6_hop_jumbo() 1017 if (nh[optoff + 1] < 8) in ipv6_hop_calipso() [all …]
|
| A D | exthdrs_core.c | 118 const unsigned char *nh = skb_network_header(skb); in ipv6_find_tlv() local 125 hdr = (struct ipv6_opt_hdr *)(nh + offset); in ipv6_find_tlv() 135 int opttype = nh[offset]; in ipv6_find_tlv() 148 optlen = nh[offset + 1] + 2; in ipv6_find_tlv()
|
| A D | datagram.c | 487 const unsigned char *nh = skb_network_header(skb); in ipv6_recv_error() local 492 const struct ipv6hdr *ip6h = container_of((struct in6_addr *)(nh + serr->addr_offset), in ipv6_recv_error() 501 ipv6_addr_set_v4mapped(*(__be32 *)(nh + serr->addr_offset), in ipv6_recv_error() 625 unsigned char *nh = skb_network_header(skb); in ip6_datagram_recv_specific_ctl() local 638 __be32 flowinfo = ip6_flowinfo((struct ipv6hdr *)nh); in ip6_datagram_recv_specific_ctl() 645 u8 *ptr = nh + sizeof(struct ipv6hdr); in ip6_datagram_recv_specific_ctl() 665 u8 *ptr = nh + off; in ip6_datagram_recv_specific_ctl() 707 u8 *ptr = nh + sizeof(struct ipv6hdr); in ip6_datagram_recv_specific_ctl() 711 u8 *ptr = nh + opt->dst0; in ip6_datagram_recv_specific_ctl() 715 struct ipv6_rt_hdr *rthdr = (struct ipv6_rt_hdr *)(nh + opt->srcrt); in ip6_datagram_recv_specific_ctl() [all …]
|
| A D | ip6_fib.c | 174 if (f6i->nh) in fib6_info_destroy_rcu() 175 nexthop_put(f6i->nh); in fib6_info_destroy_rcu() 1019 if (f6i->nh) { in fib6_drop_pcpu_from() 1040 if (rt->nh) { in fib6_purge_rt() 1041 spin_lock(&rt->nh->lock); in fib6_purge_rt() 1046 spin_unlock(&rt->nh->lock); in fib6_purge_rt() 1352 spin_lock(&rt->nh->lock); in fib6_add_rt2node_nh() 1354 if (rt->nh->dead) { in fib6_add_rt2node_nh() 1363 spin_unlock(&rt->nh->lock); in fib6_add_rt2node_nh() 1525 if (rt->nh) in fib6_add() [all …]
|
| A D | reassembly.c | 141 const unsigned char *nh = skb_network_header(skb); in ip6_frag_queue() local 143 csum_partial(nh, (u8 *)(fhdr + 1) - nh, in ip6_frag_queue()
|
| A D | icmp.c | 907 int nh; in icmpv6_rcv() local 918 nh = skb_network_offset(skb); in icmpv6_rcv() 927 skb_set_network_header(skb, nh); in icmpv6_rcv()
|
| A D | fib6_rules.c | 193 res->nh->fib_nh_dev); in fib6_rule_action_alt()
|
| /net/nsh/ |
| A D | nsh.c | 17 struct nshhdr *nh; in nsh_push() local 34 nh = (struct nshhdr *)(skb->data); in nsh_push() 35 memcpy(nh, pushed_nh, length); in nsh_push() 36 nh->np = next_proto; in nsh_push() 37 skb_postpush_rcsum(skb, nh, length); in nsh_push() 50 struct nshhdr *nh; in nsh_pop() local 56 nh = (struct nshhdr *)(skb->data); in nsh_pop() 57 length = nsh_hdr_len(nh); in nsh_pop() 60 inner_proto = tun_p_to_eth_p(nh->np); in nsh_pop()
|
| /net/netfilter/ |
| A D | utils.c | 186 unsigned char *nh; in nf_ip6_check_hbh_len() local 190 nh = (unsigned char *)(ipv6_hdr(skb) + 1); in nf_ip6_check_hbh_len() 191 len = (nh[1] + 1) << 3; in nf_ip6_check_hbh_len() 195 nh = skb_network_header(skb); in nf_ip6_check_hbh_len() 202 if (nh[off] == IPV6_TLV_PAD1) { in nf_ip6_check_hbh_len() 209 optlen = nh[off + 1] + 2; in nf_ip6_check_hbh_len() 213 if (nh[off] == IPV6_TLV_JUMBO) { in nf_ip6_check_hbh_len() 216 if (nh[off + 1] != 4 || (off & 3) != 2) in nf_ip6_check_hbh_len() 218 pkt_len = ntohl(*(__be32 *)(nh + off + 2)); in nf_ip6_check_hbh_len()
|
| A D | nf_nat_masquerade.c | 37 __be32 newsrc, nh; in nf_nat_masquerade_ipv4() local 53 nh = rt_nexthop(rt, ip_hdr(skb)->daddr); in nf_nat_masquerade_ipv4() 54 newsrc = inet_select_addr(out, nh, RT_SCOPE_UNIVERSE); in nf_nat_masquerade_ipv4()
|
| /net/ipv6/netfilter/ |
| A D | nf_conntrack_reasm.c | 199 const unsigned char *nh = skb_network_header(skb); in nf_ct_frag6_queue() local 201 csum_partial(nh, (u8 *)(fhdr + 1) - nh, in nf_ct_frag6_queue()
|
| /net/dsa/ |
| A D | switch.c | 1086 struct raw_notifier_head *nh = &dst->nh; in dsa_tree_notify() local 1089 err = raw_notifier_call_chain(nh, e, v); in dsa_tree_notify() 1124 return raw_notifier_chain_register(&ds->dst->nh, &ds->nb); in dsa_switch_register_notifier() 1131 err = raw_notifier_chain_unregister(&ds->dst->nh, &ds->nb); in dsa_switch_unregister_notifier()
|
| /net/xfrm/ |
| A D | xfrm_output.c | 84 const unsigned char *nh = skb_network_header(skb); in mip6_rthdr_offset() local 89 packet_len = skb_tail_pointer(skb) - nh; in mip6_rthdr_offset() 102 rt = (struct ipv6_rt_hdr *)(nh + offset); in mip6_rthdr_offset()
|
| /net/core/ |
| A D | filter.c | 2233 if (!nh) { in bpf_out_neigh_v6() 2238 nexthop = &nh->ipv6_nh; in bpf_out_neigh_v6() 2268 if (!nh) { in __bpf_redirect_neigh_v6() 2333 if (!nh) { in bpf_out_neigh_v4() 2372 if (!nh) { in __bpf_redirect_neigh_v4() 2417 struct bpf_nh_params *nh) in __bpf_redirect_neigh() argument 2527 &ri->nh : NULL) : in skb_do_redirect() 2589 memcpy(&ri->nh, params, sizeof(ri->nh)); in BPF_CALL_4() 6236 if (res.nh->fib_nh_lws) in bpf_ipv6_fib_lookup() 6240 *dst = res.nh->fib_nh_gw6; in bpf_ipv6_fib_lookup() [all …]
|