Home
last modified time | relevance | path

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

/net/netfilter/
Dnf_flow_table_ip.c343 static int nf_flow_nat_ipv6_l4proto(struct sk_buff *skb, struct ipv6hdr *ip6h, in nf_flow_nat_ipv6_l4proto() argument
347 switch (ip6h->nexthdr) { in nf_flow_nat_ipv6_l4proto()
362 struct sk_buff *skb, struct ipv6hdr *ip6h, in nf_flow_snat_ipv6() argument
370 addr = ip6h->saddr; in nf_flow_snat_ipv6()
372 ip6h->saddr = new_addr; in nf_flow_snat_ipv6()
375 addr = ip6h->daddr; in nf_flow_snat_ipv6()
377 ip6h->daddr = new_addr; in nf_flow_snat_ipv6()
383 return nf_flow_nat_ipv6_l4proto(skb, ip6h, thoff, &addr, &new_addr); in nf_flow_snat_ipv6()
387 struct sk_buff *skb, struct ipv6hdr *ip6h, in nf_flow_dnat_ipv6() argument
395 addr = ip6h->daddr; in nf_flow_dnat_ipv6()
[all …]
Dxt_HL.c68 struct ipv6hdr *ip6h; in hl_tg6() local
72 if (skb_ensure_writable(skb, sizeof(*ip6h))) in hl_tg6()
75 ip6h = ipv6_hdr(skb); in hl_tg6()
82 new_hl = ip6h->hop_limit + info->hop_limit; in hl_tg6()
87 new_hl = ip6h->hop_limit - info->hop_limit; in hl_tg6()
92 new_hl = ip6h->hop_limit; in hl_tg6()
96 ip6h->hop_limit = new_hl; in hl_tg6()
Dxt_hl.c47 const struct ipv6hdr *ip6h = ipv6_hdr(skb); in hl_mt6() local
51 return ip6h->hop_limit == info->hop_limit; in hl_mt6()
53 return ip6h->hop_limit != info->hop_limit; in hl_mt6()
55 return ip6h->hop_limit < info->hop_limit; in hl_mt6()
57 return ip6h->hop_limit > info->hop_limit; in hl_mt6()
Dutils.c67 const struct ipv6hdr *ip6h = ipv6_hdr(skb); in nf_ip6_checksum() local
74 if (!csum_ipv6_magic(&ip6h->saddr, &ip6h->daddr, in nf_ip6_checksum()
85 csum_ipv6_magic(&ip6h->saddr, &ip6h->daddr, in nf_ip6_checksum()
101 const struct ipv6hdr *ip6h = ipv6_hdr(skb); in nf_ip6_checksum_partial() local
112 skb->csum = ~csum_unfold(csum_ipv6_magic(&ip6h->saddr, in nf_ip6_checksum_partial()
113 &ip6h->daddr, in nf_ip6_checksum_partial()
Dnft_fwd_netdev.c121 struct ipv6hdr *ip6h; in nft_fwd_neigh_eval() local
127 if (skb_try_make_writable(skb, sizeof(*ip6h))) { in nft_fwd_neigh_eval()
131 ip6h = ipv6_hdr(skb); in nft_fwd_neigh_eval()
132 ip6h->hop_limit--; in nft_fwd_neigh_eval()
/net/ipv6/
Dmcast_snoop.c16 const struct ipv6hdr *ip6h; in ipv6_mc_check_ip6hdr() local
18 unsigned int offset = skb_network_offset(skb) + sizeof(*ip6h); in ipv6_mc_check_ip6hdr()
23 ip6h = ipv6_hdr(skb); in ipv6_mc_check_ip6hdr()
25 if (ip6h->version != 6) in ipv6_mc_check_ip6hdr()
28 len = offset + ntohs(ip6h->payload_len); in ipv6_mc_check_ip6hdr()
39 const struct ipv6hdr *ip6h; in ipv6_mc_check_exthdrs() local
44 ip6h = ipv6_hdr(skb); in ipv6_mc_check_exthdrs()
46 if (ip6h->nexthdr != IPPROTO_HOPOPTS) in ipv6_mc_check_exthdrs()
49 nexthdr = ip6h->nexthdr; in ipv6_mc_check_exthdrs()
50 offset = skb_network_offset(skb) + sizeof(*ip6h); in ipv6_mc_check_exthdrs()
Dip6_udp_tunnel.c89 struct ipv6hdr *ip6h; in udp_tunnel6_xmit_skb() local
104 __skb_push(skb, sizeof(*ip6h)); in udp_tunnel6_xmit_skb()
106 ip6h = ipv6_hdr(skb); in udp_tunnel6_xmit_skb()
107 ip6_flow_hdr(ip6h, prio, label); in udp_tunnel6_xmit_skb()
108 ip6h->payload_len = htons(skb->len); in udp_tunnel6_xmit_skb()
109 ip6h->nexthdr = IPPROTO_UDP; in udp_tunnel6_xmit_skb()
110 ip6h->hop_limit = ttl; in udp_tunnel6_xmit_skb()
111 ip6h->daddr = *daddr; in udp_tunnel6_xmit_skb()
112 ip6h->saddr = *saddr; in udp_tunnel6_xmit_skb()
Dah6.c521 struct ipv6hdr *ip6h; in ah6_input() local
564 ip6h = ipv6_hdr(skb); in ah6_input()
587 memcpy(work_iph, ip6h, hdr_len); in ah6_input()
591 err = ipv6_clear_mutable_options(ip6h, hdr_len, XFRM_POLICY_IN); in ah6_input()
595 ip6h->priority = 0; in ah6_input()
596 ip6h->flow_lbl[0] = 0; in ah6_input()
597 ip6h->flow_lbl[1] = 0; in ah6_input()
598 ip6h->flow_lbl[2] = 0; in ah6_input()
599 ip6h->hop_limit = 0; in ah6_input()
Dtcp_ipv6.c683 const struct ipv6hdr *ip6h = ipv6_hdr(skb); in tcp_v6_md5_hash_skb() local
684 saddr = &ip6h->saddr; in tcp_v6_md5_hash_skb()
685 daddr = &ip6h->daddr; in tcp_v6_md5_hash_skb()
724 const struct ipv6hdr *ip6h = ipv6_hdr(skb); in tcp_v6_inbound_md5_hash() local
729 hash_expected = tcp_v6_md5_do_lookup(sk, &ip6h->saddr); in tcp_v6_inbound_md5_hash()
755 &ip6h->saddr, ntohs(th->source), in tcp_v6_inbound_md5_hash()
756 &ip6h->daddr, ntohs(th->dest)); in tcp_v6_inbound_md5_hash()
Ddatagram.c470 const struct ipv6hdr *ip6h = container_of((struct in6_addr *)(nh + serr->addr_offset), in ipv6_recv_error() local
472 sin->sin6_addr = ip6h->daddr; in ipv6_recv_error()
474 sin->sin6_flowinfo = ip6_flowinfo(ip6h); in ipv6_recv_error()
Draw.c375 const struct ipv6hdr *ip6h = (const struct ipv6hdr *)skb->data; in raw6_icmp_error() local
376 saddr = &ip6h->saddr; in raw6_icmp_error()
377 daddr = &ip6h->daddr; in raw6_icmp_error()
/net/ipv6/netfilter/
Dnf_reject_ipv6.c67 struct ipv6hdr *ip6h; in nf_reject_ip6hdr_put() local
74 ip6h = ipv6_hdr(nskb); in nf_reject_ip6hdr_put()
75 ip6_flow_hdr(ip6h, tclass, 0); in nf_reject_ip6hdr_put()
76 ip6h->hop_limit = hoplimit; in nf_reject_ip6hdr_put()
77 ip6h->nexthdr = protocol; in nf_reject_ip6hdr_put()
78 ip6h->saddr = oip6h->daddr; in nf_reject_ip6hdr_put()
79 ip6h->daddr = oip6h->saddr; in nf_reject_ip6hdr_put()
83 return ip6h; in nf_reject_ip6hdr_put()
137 struct ipv6hdr *ip6h; in nf_send_reset6() local
185 ip6h = nf_reject_ip6hdr_put(nskb, oldskb, IPPROTO_TCP, in nf_send_reset6()
[all …]
/net/ipv6/ila/
Dila_common.c35 static __wsum get_csum_diff(struct ipv6hdr *ip6h, struct ila_params *p) in get_csum_diff() argument
37 return get_csum_diff_iaddr(ila_a2i(&ip6h->daddr), p); in get_csum_diff()
78 struct ipv6hdr *ip6h = ipv6_hdr(skb); in ila_csum_adjust_transport() local
81 switch (ip6h->nexthdr) { in ila_csum_adjust_transport()
87 diff = get_csum_diff(ip6h, p); in ila_csum_adjust_transport()
98 diff = get_csum_diff(ip6h, p); in ila_csum_adjust_transport()
112 diff = get_csum_diff(ip6h, p); in ila_csum_adjust_transport()
123 struct ipv6hdr *ip6h = ipv6_hdr(skb); in ila_update_ipv6_locator() local
124 struct ila_addr *iaddr = ila_a2i(&ip6h->daddr); in ila_update_ipv6_locator()
Dila_lwt.c63 struct ipv6hdr *ip6h = ipv6_hdr(skb); in ila_output() local
74 &ip6h->daddr); in ila_output()
Dila_xlat.c637 struct ipv6hdr *ip6h = ipv6_hdr(skb); in ila_xlat_addr() local
640 struct ila_addr *iaddr = ila_a2i(&ip6h->daddr); in ila_xlat_addr()
/net/sched/
Dact_csum.c186 const struct ipv6hdr *ip6h; in tcf_csum_ipv6_icmp() local
192 ip6h = ipv6_hdr(skb); in tcf_csum_ipv6_icmp()
195 icmp6h->icmp6_cksum = csum_ipv6_magic(&ip6h->saddr, &ip6h->daddr, in tcf_csum_ipv6_icmp()
232 const struct ipv6hdr *ip6h; in tcf_csum_ipv6_tcp() local
241 ip6h = ipv6_hdr(skb); in tcf_csum_ipv6_tcp()
244 tcph->check = csum_ipv6_magic(&ip6h->saddr, &ip6h->daddr, in tcf_csum_ipv6_tcp()
313 const struct ipv6hdr *ip6h; in tcf_csum_ipv6_udp() local
330 ip6h = ipv6_hdr(skb); in tcf_csum_ipv6_udp()
351 udph->check = csum_ipv6_magic(&ip6h->saddr, &ip6h->daddr, ul, in tcf_csum_ipv6_udp()
485 struct ipv6hdr *ip6h; in tcf_csum_ipv6() local
[all …]
/net/core/
Dnetpoll.c388 struct ipv6hdr *ip6h; in netpoll_send_udp() local
394 ip_len = udp_len + sizeof(*ip6h); in netpoll_send_udp()
424 skb_push(skb, sizeof(*ip6h)); in netpoll_send_udp()
426 ip6h = ipv6_hdr(skb); in netpoll_send_udp()
429 put_unaligned(0x60, (unsigned char *)ip6h); in netpoll_send_udp()
430 ip6h->flow_lbl[0] = 0; in netpoll_send_udp()
431 ip6h->flow_lbl[1] = 0; in netpoll_send_udp()
432 ip6h->flow_lbl[2] = 0; in netpoll_send_udp()
434 ip6h->payload_len = htons(sizeof(struct udphdr) + len); in netpoll_send_udp()
435 ip6h->nexthdr = IPPROTO_UDP; in netpoll_send_udp()
[all …]
/net/bridge/netfilter/
Dnft_reject_bridge.c220 const struct ipv6hdr *ip6h = ipv6_hdr(skb); in reject6_br_csum_ok() local
223 u8 proto = ip6h->nexthdr; in reject6_br_csum_ok()
228 if (ip6h->payload_len && in reject6_br_csum_ok()
229 pskb_trim_rcsum(skb, ntohs(ip6h->payload_len) + sizeof(*ip6h))) in reject6_br_csum_ok()
232 ip6h = ipv6_hdr(skb); in reject6_br_csum_ok()
233 thoff = ipv6_skip_exthdr(skb, ((u8*)(ip6h+1) - skb->data), &proto, &fo); in reject6_br_csum_ok()
/net/bridge/
Dbr_multicast.c316 struct ipv6hdr *ip6h; in br_ip6_multicast_alloc_query() local
326 skb = netdev_alloc_skb_ip_align(br->dev, sizeof(*eth) + sizeof(*ip6h) + in br_ip6_multicast_alloc_query()
343 ip6h = ipv6_hdr(skb); in br_ip6_multicast_alloc_query()
345 *(__force __be32 *)ip6h = htonl(0x60000000); in br_ip6_multicast_alloc_query()
346 ip6h->payload_len = htons(8 + mld_hdr_size); in br_ip6_multicast_alloc_query()
347 ip6h->nexthdr = IPPROTO_HOPOPTS; in br_ip6_multicast_alloc_query()
348 ip6h->hop_limit = 1; in br_ip6_multicast_alloc_query()
349 ipv6_addr_set(&ip6h->daddr, htonl(0xff020000), 0, 0, htonl(1)); in br_ip6_multicast_alloc_query()
350 if (ipv6_dev_get_saddr(dev_net(br->dev), br->dev, &ip6h->daddr, 0, in br_ip6_multicast_alloc_query()
351 &ip6h->saddr)) { in br_ip6_multicast_alloc_query()
[all …]
/net/ipv4/
Dtcp_fastopen.c153 const struct ipv6hdr *ip6h = ipv6_hdr(syn); in __tcp_fastopen_cookie_gen_cipher() local
155 foc->val[0] = cpu_to_le64(siphash(&ip6h->saddr, in __tcp_fastopen_cookie_gen_cipher()
156 sizeof(ip6h->saddr) + in __tcp_fastopen_cookie_gen_cipher()
157 sizeof(ip6h->daddr), in __tcp_fastopen_cookie_gen_cipher()
/net/xfrm/
Dxfrm_input.c294 struct ipv6hdr *ip6h; in xfrm6_remove_beet_encap() local
308 ip6h = ipv6_hdr(skb); in xfrm6_remove_beet_encap()
309 ip6h->payload_len = htons(skb->len - size); in xfrm6_remove_beet_encap()
310 ip6h->daddr = x->sel.daddr.in6; in xfrm6_remove_beet_encap()
311 ip6h->saddr = x->sel.saddr.in6; in xfrm6_remove_beet_encap()