Lines Matching +full:foo +full:- +full:over +full:- +full:udp

2 // SPDX-License-Identifier: GPL-2.0-only
6 #include <linux/udp.h>
10 #include <net/udp.h>
28 if (cfg->ipv6_v6only) { in udp_sock_create6()
29 err = ip6_sock_set_v6only(sock->sk); in udp_sock_create6()
33 if (cfg->bind_ifindex) { in udp_sock_create6()
34 err = sock_bindtoindex(sock->sk, cfg->bind_ifindex, true); in udp_sock_create6()
40 memcpy(&udp6_addr.sin6_addr, &cfg->local_ip6, in udp_sock_create6()
42 udp6_addr.sin6_port = cfg->local_udp_port; in udp_sock_create6()
48 if (cfg->peer_udp_port) { in udp_sock_create6()
51 memcpy(&udp6_addr.sin6_addr, &cfg->peer_ip6, in udp_sock_create6()
53 udp6_addr.sin6_port = cfg->peer_udp_port; in udp_sock_create6()
61 udp_set_no_check6_tx(sock->sk, !cfg->use_udp6_tx_checksums); in udp_sock_create6()
62 udp_set_no_check6_rx(sock->sk, !cfg->use_udp6_rx_checksums); in udp_sock_create6()
92 uh->dest = dst_port; in udp_tunnel6_xmit_skb()
93 uh->source = src_port; in udp_tunnel6_xmit_skb()
95 uh->len = htons(skb->len); in udp_tunnel6_xmit_skb()
99 udp6_set_csum(nocheck, skb, saddr, daddr, skb->len); in udp_tunnel6_xmit_skb()
105 ip6h->payload_len = htons(skb->len); in udp_tunnel6_xmit_skb()
106 ip6h->nexthdr = IPPROTO_UDP; in udp_tunnel6_xmit_skb()
107 ip6h->hop_limit = ttl; in udp_tunnel6_xmit_skb()
108 ip6h->daddr = *daddr; in udp_tunnel6_xmit_skb()
109 ip6h->saddr = *saddr; in udp_tunnel6_xmit_skb()
117 * udp_tunnel6_dst_lookup - perform route lookup on UDP tunnel
125 * @sport: UDP source port
126 * @dport: UDP destination port
129 * This function performs a route lookup on a UDP tunnel
156 fl6.flowi6_mark = skb->mark; in udp_tunnel6_dst_lookup()
159 fl6.daddr = key->u.ipv6.dst; in udp_tunnel6_dst_lookup()
160 fl6.saddr = key->u.ipv6.src; in udp_tunnel6_dst_lookup()
163 fl6.flowlabel = ip6_make_flowinfo(dsfield, key->label); in udp_tunnel6_dst_lookup()
165 dst = ipv6_stub->ipv6_dst_lookup_flow(net, sock->sk, &fl6, in udp_tunnel6_dst_lookup()
169 return ERR_PTR(-ENETUNREACH); in udp_tunnel6_dst_lookup()
171 if (dst->dev == dev) { /* is this necessary? */ in udp_tunnel6_dst_lookup()
174 return ERR_PTR(-ELOOP); in udp_tunnel6_dst_lookup()
185 MODULE_DESCRIPTION("IPv6 Foo over UDP tunnel driver");