Home
last modified time | relevance | path

Searched refs:nh (Results 1 – 25 of 30) sorted by relevance

12

/net/ipv4/
A Dfib_semantics.c226 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 Dnexthop.c119 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 Dicmp.c1209 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 Dip_tunnel.c382 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 Dactions.c422 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 Dflow.c391 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 Dflow_netlink.h70 int nsh_hdr_from_nlattr(const struct nlattr *attr, struct nshhdr *nh,
A Dflow_netlink.c1309 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 Daf_mpls.c262 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 Dinternal.h161 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 Droute.c535 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 Dexthdrs.c136 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 Dexthdrs_core.c118 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 Ddatagram.c487 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 Dip6_fib.c174 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 Dreassembly.c141 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 Dicmp.c907 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 Dfib6_rules.c193 res->nh->fib_nh_dev); in fib6_rule_action_alt()
/net/nsh/
A Dnsh.c17 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 Dutils.c186 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 Dnf_nat_masquerade.c37 __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 Dnf_conntrack_reasm.c199 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 Dswitch.c1086 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 Dxfrm_output.c84 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 Dfilter.c2233 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 …]

Completed in 117 milliseconds

12