Lines Matching +full:foo +full:- +full:over +full:- +full:udp
1 // SPDX-License-Identifier: GPL-2.0-only
7 #include <linux/udp.h>
16 #include <net/udp.h>
31 uh->dest = e->dport; in fou6_build_udp()
32 uh->source = sport; in fou6_build_udp()
33 uh->len = htons(skb->len); in fou6_build_udp()
34 udp6_set_csum(!(e->flags & TUNNEL_ENCAP_FLAG_CSUM6), skb, in fou6_build_udp()
35 &fl6->saddr, &fl6->daddr, skb->len); in fou6_build_udp()
45 int type = e->flags & TUNNEL_ENCAP_FLAG_CSUM6 ? in fou6_build_header()
62 int type = e->flags & TUNNEL_ENCAP_FLAG_CSUM6 ? in gue6_build_header()
81 if (ipprot && ipprot->err_handler) { in gue6_err_proto_handler()
82 if (!ipprot->err_handler(skb, opt, type, code, offset, info)) in gue6_err_proto_handler()
86 return -ENOENT; in gue6_err_proto_handler()
99 return -EINVAL; in gue6_err()
103 switch (guehdr->version) { in gue6_err()
108 skb_set_transport_header(skb, -(int)sizeof(struct icmp6hdr)); in gue6_err()
110 switch (((struct iphdr *)guehdr)->version) { in gue6_err()
120 ret = -EOPNOTSUPP; in gue6_err()
125 return -EOPNOTSUPP; in gue6_err()
128 if (guehdr->control) in gue6_err()
129 return -ENOENT; in gue6_err()
131 optlen = guehdr->hlen << 2; in gue6_err()
134 return -EINVAL; in gue6_err()
138 return -EINVAL; in gue6_err()
140 /* Handling exceptions for direct UDP encapsulation in GUE would lead to in gue6_err()
144 if (guehdr->proto_ctype == IPPROTO_UDP || in gue6_err()
145 guehdr->proto_ctype == IPPROTO_UDPLITE) in gue6_err()
146 return -EOPNOTSUPP; in gue6_err()
148 skb_set_transport_header(skb, -(int)sizeof(struct icmp6hdr)); in gue6_err()
149 ret = gue6_err_proto_handler(guehdr->proto_ctype, skb, in gue6_err()
227 MODULE_DESCRIPTION("Foo over UDP (IPv6)");