Home
last modified time | relevance | path

Searched refs:ip6h (Results 1 – 29 of 29) sorted by relevance

/linux-4.4.14/include/net/netfilter/
Dnf_queue.h60 const struct ipv6hdr *ip6h = ipv6_hdr(skb); in hash_v6() local
63 if ((__force u32)ip6h->saddr.s6_addr32[3] < in hash_v6()
64 (__force u32)ip6h->daddr.s6_addr32[3]) { in hash_v6()
65 a = (__force u32) ip6h->saddr.s6_addr32[3]; in hash_v6()
66 b = (__force u32) ip6h->daddr.s6_addr32[3]; in hash_v6()
68 b = (__force u32) ip6h->saddr.s6_addr32[3]; in hash_v6()
69 a = (__force u32) ip6h->daddr.s6_addr32[3]; in hash_v6()
72 if ((__force u32)ip6h->saddr.s6_addr32[1] < in hash_v6()
73 (__force u32)ip6h->daddr.s6_addr32[1]) in hash_v6()
74 c = (__force u32) ip6h->saddr.s6_addr32[1]; in hash_v6()
[all …]
/linux-4.4.14/net/ipv6/
Dmcast_snoop.c28 const struct ipv6hdr *ip6h; in ipv6_mc_check_ip6hdr() local
30 unsigned int offset = skb_network_offset(skb) + sizeof(*ip6h); in ipv6_mc_check_ip6hdr()
35 ip6h = ipv6_hdr(skb); in ipv6_mc_check_ip6hdr()
37 if (ip6h->version != 6) in ipv6_mc_check_ip6hdr()
40 len = offset + ntohs(ip6h->payload_len); in ipv6_mc_check_ip6hdr()
49 const struct ipv6hdr *ip6h; in ipv6_mc_check_exthdrs() local
54 ip6h = ipv6_hdr(skb); in ipv6_mc_check_exthdrs()
56 if (ip6h->nexthdr != IPPROTO_HOPOPTS) in ipv6_mc_check_exthdrs()
59 nexthdr = ip6h->nexthdr; in ipv6_mc_check_exthdrs()
60 offset = skb_network_offset(skb) + sizeof(*ip6h); in ipv6_mc_check_exthdrs()
Dip6_udp_tunnel.c80 struct ipv6hdr *ip6h; in udp_tunnel6_xmit_skb() local
98 __skb_push(skb, sizeof(*ip6h)); in udp_tunnel6_xmit_skb()
100 ip6h = ipv6_hdr(skb); in udp_tunnel6_xmit_skb()
101 ip6_flow_hdr(ip6h, prio, htonl(0)); in udp_tunnel6_xmit_skb()
102 ip6h->payload_len = htons(skb->len); in udp_tunnel6_xmit_skb()
103 ip6h->nexthdr = IPPROTO_UDP; in udp_tunnel6_xmit_skb()
104 ip6h->hop_limit = ttl; in udp_tunnel6_xmit_skb()
105 ip6h->daddr = *daddr; in udp_tunnel6_xmit_skb()
106 ip6h->saddr = *saddr; in udp_tunnel6_xmit_skb()
Dila.c36 static inline __wsum get_csum_diff(struct ipv6hdr *ip6h, struct ila_params *p) in get_csum_diff() argument
38 if (*(__be64 *)&ip6h->daddr == p->locator_match) in get_csum_diff()
41 return compute_csum_diff8((__be32 *)&ip6h->daddr, in get_csum_diff()
48 struct ipv6hdr *ip6h = ipv6_hdr(skb); in update_ipv6_locator() local
52 switch (ip6h->nexthdr) { in update_ipv6_locator()
58 diff = get_csum_diff(ip6h, p); in update_ipv6_locator()
69 diff = get_csum_diff(ip6h, p); in update_ipv6_locator()
83 diff = get_csum_diff(ip6h, p); in update_ipv6_locator()
91 *(__be64 *)&ip6h->daddr = p->locator; in update_ipv6_locator()
Dnetfilter.c135 const struct ipv6hdr *ip6h = ipv6_hdr(skb); in nf_ip6_checksum() local
142 if (!csum_ipv6_magic(&ip6h->saddr, &ip6h->daddr, in nf_ip6_checksum()
153 csum_ipv6_magic(&ip6h->saddr, &ip6h->daddr, in nf_ip6_checksum()
169 const struct ipv6hdr *ip6h = ipv6_hdr(skb); in nf_ip6_checksum_partial() local
180 skb->csum = ~csum_unfold(csum_ipv6_magic(&ip6h->saddr, in nf_ip6_checksum_partial()
181 &ip6h->daddr, in nf_ip6_checksum_partial()
Dxfrm6_mode_beet.c82 struct ipv6hdr *ip6h; in xfrm6_beet_input() local
96 ip6h = ipv6_hdr(skb); in xfrm6_beet_input()
97 ip6h->payload_len = htons(skb->len - size); in xfrm6_beet_input()
98 ip6h->daddr = x->sel.daddr.in6; in xfrm6_beet_input()
99 ip6h->saddr = x->sel.saddr.in6; in xfrm6_beet_input()
Dah6.c526 struct ipv6hdr *ip6h; in ah6_input() local
569 ip6h = ipv6_hdr(skb); in ah6_input()
592 memcpy(work_iph, ip6h, hdr_len); in ah6_input()
596 if (ipv6_clear_mutable_options(ip6h, hdr_len, XFRM_POLICY_IN)) in ah6_input()
599 ip6h->priority = 0; in ah6_input()
600 ip6h->flow_lbl[0] = 0; in ah6_input()
601 ip6h->flow_lbl[1] = 0; in ah6_input()
602 ip6h->flow_lbl[2] = 0; in ah6_input()
603 ip6h->hop_limit = 0; in ah6_input()
Dtcp_ipv6.c595 const struct ipv6hdr *ip6h = ipv6_hdr(skb); in tcp_v6_md5_hash_skb() local
596 saddr = &ip6h->saddr; in tcp_v6_md5_hash_skb()
597 daddr = &ip6h->daddr; in tcp_v6_md5_hash_skb()
637 const struct ipv6hdr *ip6h = ipv6_hdr(skb); in tcp_v6_inbound_md5_hash() local
642 hash_expected = tcp_v6_md5_do_lookup(sk, &ip6h->saddr); in tcp_v6_inbound_md5_hash()
667 &ip6h->saddr, ntohs(th->source), in tcp_v6_inbound_md5_hash()
668 &ip6h->daddr, ntohs(th->dest)); in tcp_v6_inbound_md5_hash()
Ddatagram.c423 const struct ipv6hdr *ip6h = container_of((struct in6_addr *)(nh + serr->addr_offset), in ipv6_recv_error() local
425 sin->sin6_addr = ip6h->daddr; in ipv6_recv_error()
427 sin->sin6_flowinfo = ip6_flowinfo(ip6h); in ipv6_recv_error()
Draw.c373 const struct ipv6hdr *ip6h = (const struct ipv6hdr *)skb->data; in raw6_icmp_error() local
374 saddr = &ip6h->saddr; in raw6_icmp_error()
375 daddr = &ip6h->daddr; in raw6_icmp_error()
/linux-4.4.14/net/ipv6/netfilter/
Dnf_reject_ipv6.c71 struct ipv6hdr *ip6h; in nf_reject_ip6hdr_put() local
78 ip6h = ipv6_hdr(nskb); in nf_reject_ip6hdr_put()
79 ip6_flow_hdr(ip6h, tclass, 0); in nf_reject_ip6hdr_put()
80 ip6h->hop_limit = hoplimit; in nf_reject_ip6hdr_put()
81 ip6h->nexthdr = protocol; in nf_reject_ip6hdr_put()
82 ip6h->saddr = oip6h->daddr; in nf_reject_ip6hdr_put()
83 ip6h->daddr = oip6h->saddr; in nf_reject_ip6hdr_put()
87 return ip6h; in nf_reject_ip6hdr_put()
140 struct ipv6hdr *ip6h; in nf_send_reset6() local
184 ip6h = nf_reject_ip6hdr_put(nskb, oldskb, IPPROTO_TCP, in nf_send_reset6()
[all …]
/linux-4.4.14/net/sched/
Dact_csum.c156 const struct ipv6hdr *ip6h; in tcf_csum_ipv6_icmp() local
162 ip6h = ipv6_hdr(skb); in tcf_csum_ipv6_icmp()
165 icmp6h->icmp6_cksum = csum_ipv6_magic(&ip6h->saddr, &ip6h->daddr, in tcf_csum_ipv6_icmp()
199 const struct ipv6hdr *ip6h; in tcf_csum_ipv6_tcp() local
205 ip6h = ipv6_hdr(skb); in tcf_csum_ipv6_tcp()
208 tcph->check = csum_ipv6_magic(&ip6h->saddr, &ip6h->daddr, in tcf_csum_ipv6_tcp()
274 const struct ipv6hdr *ip6h; in tcf_csum_ipv6_udp() local
288 ip6h = ipv6_hdr(skb); in tcf_csum_ipv6_udp()
309 udph->check = csum_ipv6_magic(&ip6h->saddr, &ip6h->daddr, ul, in tcf_csum_ipv6_udp()
420 struct ipv6hdr *ip6h; in tcf_csum_ipv6() local
[all …]
/linux-4.4.14/net/netfilter/
Dxt_hl.c50 const struct ipv6hdr *ip6h = ipv6_hdr(skb); in hl_mt6() local
54 return ip6h->hop_limit == info->hop_limit; in hl_mt6()
56 return ip6h->hop_limit != info->hop_limit; in hl_mt6()
58 return ip6h->hop_limit < info->hop_limit; in hl_mt6()
60 return ip6h->hop_limit > info->hop_limit; in hl_mt6()
Dxt_HL.c71 struct ipv6hdr *ip6h; in hl_tg6() local
78 ip6h = ipv6_hdr(skb); in hl_tg6()
85 new_hl = ip6h->hop_limit + info->hop_limit; in hl_tg6()
90 new_hl = ip6h->hop_limit - info->hop_limit; in hl_tg6()
95 new_hl = ip6h->hop_limit; in hl_tg6()
99 ip6h->hop_limit = new_hl; in hl_tg6()
Dnf_tables_netdev.c55 struct ipv6hdr *ip6h, _ip6h; in __nft_netdev_set_pktinfo_ipv6() local
61 ip6h = skb_header_pointer(skb, skb_network_offset(skb), sizeof(*ip6h), in __nft_netdev_set_pktinfo_ipv6()
63 if (!ip6h) in __nft_netdev_set_pktinfo_ipv6()
66 if (ip6h->version != 6) in __nft_netdev_set_pktinfo_ipv6()
69 pkt_len = ntohs(ip6h->payload_len); in __nft_netdev_set_pktinfo_ipv6()
70 if (pkt_len + sizeof(*ip6h) > skb->len) in __nft_netdev_set_pktinfo_ipv6()
/linux-4.4.14/drivers/net/ipvlan/
Dipvlan_core.c156 struct ipv6hdr *ip6h; in ipvlan_get_L3_hdr() local
158 if (unlikely(!pskb_may_pull(skb, sizeof(*ip6h)))) in ipvlan_get_L3_hdr()
161 ip6h = ipv6_hdr(skb); in ipvlan_get_L3_hdr()
162 if (ip6h->version != 6) in ipvlan_get_L3_hdr()
166 lyr3h = ip6h; in ipvlan_get_L3_hdr()
168 if (ipv6_addr_any(&ip6h->saddr) && in ipvlan_get_L3_hdr()
169 ip6h->nexthdr == NEXTHDR_ICMP) { in ipvlan_get_L3_hdr()
171 lyr3h = ip6h + 1; in ipvlan_get_L3_hdr()
301 struct ipv6hdr *ip6h; in ipvlan_addr_lookup() local
304 ip6h = (struct ipv6hdr *)lyr3h; in ipvlan_addr_lookup()
[all …]
/linux-4.4.14/include/net/
Ddst_metadata.h137 const struct ipv6hdr *ip6h = ipv6_hdr(skb); in ipv6_tun_rx_dst() local
152 info->key.u.ipv6.src = ip6h->saddr; in ipv6_tun_rx_dst()
153 info->key.u.ipv6.dst = ip6h->daddr; in ipv6_tun_rx_dst()
154 info->key.tos = ipv6_get_dsfield(ip6h); in ipv6_tun_rx_dst()
155 info->key.ttl = ip6h->hop_limit; in ipv6_tun_rx_dst()
/linux-4.4.14/net/core/
Dnetpoll.c386 struct ipv6hdr *ip6h; in netpoll_send_udp() local
392 ip_len = udp_len + sizeof(*ip6h); in netpoll_send_udp()
422 skb_push(skb, sizeof(*ip6h)); in netpoll_send_udp()
424 ip6h = ipv6_hdr(skb); in netpoll_send_udp()
427 put_unaligned(0x60, (unsigned char *)ip6h); in netpoll_send_udp()
428 ip6h->flow_lbl[0] = 0; in netpoll_send_udp()
429 ip6h->flow_lbl[1] = 0; in netpoll_send_udp()
430 ip6h->flow_lbl[2] = 0; in netpoll_send_udp()
432 ip6h->payload_len = htons(sizeof(struct udphdr) + len); in netpoll_send_udp()
433 ip6h->nexthdr = IPPROTO_UDP; in netpoll_send_udp()
[all …]
/linux-4.4.14/net/bridge/netfilter/
Dnft_reject_bridge.c180 const struct ipv6hdr *ip6h = ipv6_hdr(skb); in reject6_br_csum_ok() local
183 u8 proto = ip6h->nexthdr; in reject6_br_csum_ok()
191 if (ip6h->payload_len && in reject6_br_csum_ok()
192 pskb_trim_rcsum(skb, ntohs(ip6h->payload_len) + sizeof(*ip6h))) in reject6_br_csum_ok()
195 thoff = ipv6_skip_exthdr(skb, ((u8*)(ip6h+1) - skb->data), &proto, &fo); in reject6_br_csum_ok()
/linux-4.4.14/net/ipv4/
Dtcp_fastopen.c111 const struct ipv6hdr *ip6h = ipv6_hdr(syn); in tcp_fastopen_cookie_gen() local
114 if (__tcp_fastopen_cookie_gen(&ip6h->saddr, &tmp)) { in tcp_fastopen_cookie_gen()
119 buf->s6_addr32[i] ^= ip6h->daddr.s6_addr32[i]; in tcp_fastopen_cookie_gen()
/linux-4.4.14/net/bridge/
Dbr_multicast.c434 struct ipv6hdr *ip6h; in br_ip6_multicast_alloc_query() local
440 skb = netdev_alloc_skb_ip_align(br->dev, sizeof(*eth) + sizeof(*ip6h) + in br_ip6_multicast_alloc_query()
457 ip6h = ipv6_hdr(skb); in br_ip6_multicast_alloc_query()
459 *(__force __be32 *)ip6h = htonl(0x60000000); in br_ip6_multicast_alloc_query()
460 ip6h->payload_len = htons(8 + sizeof(*mldq)); in br_ip6_multicast_alloc_query()
461 ip6h->nexthdr = IPPROTO_HOPOPTS; in br_ip6_multicast_alloc_query()
462 ip6h->hop_limit = 1; in br_ip6_multicast_alloc_query()
463 ipv6_addr_set(&ip6h->daddr, htonl(0xff020000), 0, 0, htonl(1)); in br_ip6_multicast_alloc_query()
464 if (ipv6_dev_get_saddr(dev_net(br->dev), br->dev, &ip6h->daddr, 0, in br_ip6_multicast_alloc_query()
465 &ip6h->saddr)) { in br_ip6_multicast_alloc_query()
[all …]
/linux-4.4.14/drivers/net/
Dgeneve.c162 struct ipv6hdr *ip6h = NULL; in geneve_rx() local
184 ip6h = ipv6_hdr(skb); /* outer IPv6 header... */ in geneve_rx()
192 addr6 = ip6h->saddr; in geneve_rx()
241 if (ip6h) in geneve_rx()
242 err = IP6_ECN_decapsulate(ip6h, skb); in geneve_rx()
252 if (ip6h) in geneve_rx()
254 &ip6h->saddr); in geneve_rx()
/linux-4.4.14/drivers/net/ethernet/chelsio/cxgb4vf/
Dsge.c1107 const struct ipv6hdr *ip6h = (const struct ipv6hdr *)iph; in hwcsum() local
1109 if (ip6h->nexthdr == IPPROTO_TCP) in hwcsum()
1111 else if (ip6h->nexthdr == IPPROTO_UDP) in hwcsum()
/linux-4.4.14/drivers/s390/net/
Dqeth_l3_main.c2787 struct ipv6hdr *ip6h = ipv6_hdr(skb); in qeth_tso_fill_header() local
2805 ip6h->payload_len = 0; in qeth_tso_fill_header()
2806 tcph->check = ~csum_ipv6_magic(&ip6h->saddr, &ip6h->daddr, in qeth_tso_fill_header()
/linux-4.4.14/drivers/net/ethernet/
Djme.c2110 struct ipv6hdr *ip6h = ipv6_hdr(skb); in jme_tx_tso() local
2112 tcp_hdr(skb)->check = ~csum_ipv6_magic(&ip6h->saddr, in jme_tx_tso()
2113 &ip6h->daddr, 0, in jme_tx_tso()
/linux-4.4.14/drivers/net/ethernet/chelsio/cxgb4/
Dsge.c1057 const struct ipv6hdr *ip6h = (const struct ipv6hdr *)iph; in hwcsum() local
1059 if (ip6h->nexthdr == IPPROTO_TCP) in hwcsum()
1061 else if (ip6h->nexthdr == IPPROTO_UDP) in hwcsum()
/linux-4.4.14/drivers/net/ethernet/marvell/
Dmvneta.c1471 struct ipv6hdr *ip6h = ipv6_hdr(skb); in mvneta_skb_tx_csum() local
1476 l4_proto = ip6h->nexthdr; in mvneta_skb_tx_csum()
Dmvpp2.c5043 struct ipv6hdr *ip6h = ipv6_hdr(skb); in mvpp2_skb_tx_csum() local
5048 l4_proto = ip6h->nexthdr; in mvpp2_skb_tx_csum()
/linux-4.4.14/drivers/net/ethernet/emulex/benet/
Dbe_main.c1027 struct ipv6hdr *ip6h = (struct ipv6hdr *)(skb->data + offset); in be_ipv6_exthdr_check() local
1030 if (ip6h->nexthdr != NEXTHDR_TCP && in be_ipv6_exthdr_check()
1031 ip6h->nexthdr != NEXTHDR_UDP) { in be_ipv6_exthdr_check()