| /linux/net/l2tp/ |
| H A D | l2tp_core.c | 143 static void l2tp_tunnel_free(struct l2tp_tunnel *tunnel) in l2tp_tunnel_free() argument 145 struct sock *sk = tunnel->sock; in l2tp_tunnel_free() 147 trace_free_tunnel(tunnel); in l2tp_tunnel_free() 151 switch (tunnel->encap) { in l2tp_tunnel_free() 162 tunnel->sock = NULL; in l2tp_tunnel_free() 166 kfree_rcu(tunnel, rcu); in l2tp_tunnel_free() 172 if (session->tunnel) in l2tp_session_free() 173 l2tp_tunnel_put(session->tunnel); in l2tp_session_free() 181 struct l2tp_tunnel *tunnel; in l2tp_sk_to_tunnel() local 186 idr_for_each_entry_ul(&pn->l2tp_tunnel_idr, tunnel, tmp, tunnel_id) { in l2tp_sk_to_tunnel() [all …]
|
| H A D | l2tp_debugfs.c | 37 unsigned long tkey; /* lookup key of current tunnel */ 39 struct l2tp_tunnel *tunnel; member 40 struct l2tp_session *session; /* NULL means get next tunnel */ 46 if (pd->tunnel) in l2tp_dfs_next_tunnel() 47 l2tp_tunnel_put(pd->tunnel); in l2tp_dfs_next_tunnel() 49 pd->tunnel = l2tp_tunnel_get_next(pd->net, &pd->tkey); in l2tp_dfs_next_tunnel() 59 pd->session = l2tp_session_get_next(pd->net, pd->tunnel->sock, in l2tp_dfs_next_session() 60 pd->tunnel->version, in l2tp_dfs_next_session() 61 pd->tunnel->tunnel_id, &pd->skey); in l2tp_dfs_next_session() 84 if (!pd->tunnel) in l2tp_dfs_seq_start() [all …]
|
| H A D | l2tp_ppp.c | 27 * zero, the socket is treated as a special tunnel management socket. 141 /* Helpers to obtain tunnel/session contexts from sockets. 257 struct l2tp_tunnel *tunnel; in pppol2tp_sendmsg() local 264 /* Get session and tunnel contexts */ in pppol2tp_sendmsg() 270 tunnel = session->tunnel; in pppol2tp_sendmsg() 272 uhlen = (tunnel->encap == L2TP_ENCAPTYPE_UDP) ? sizeof(struct udphdr) : 0; in pppol2tp_sendmsg() 334 struct l2tp_tunnel *tunnel; in pppol2tp_xmit() local 340 /* Get session and tunnel contexts from the socket */ in pppol2tp_xmit() 345 tunnel = session->tunnel; in pppol2tp_xmit() 347 uhlen = (tunnel->encap == L2TP_ENCAPTYPE_UDP) ? sizeof(struct udphdr) : 0; in pppol2tp_xmit() [all …]
|
| H A D | l2tp_core.h | 18 /* Random numbers used for internal consistency checks of tunnel and session structures */ 63 * Is linked into a per-tunnel session list and a per-net ("global") IDR tree. 71 struct l2tp_tunnel *tunnel; /* back pointer to tunnel context */ member 83 u32 nr_max; /* max NR. Depends on tunnel */ 88 struct list_head list; /* per-tunnel list node */ 133 /* L2TP tunnel configuration */ 151 /* Represents a tunnel instance. 153 * Holds the tunnel socket (either passed from userspace or directly created by the kernel). 154 * Maintains a list of sessions belonging to the tunnel instance. 163 bool acpt_newsess; /* indicates whether this tunnel accepts [all …]
|
| H A D | trace.h | 28 TP_PROTO(struct l2tp_tunnel *tunnel), 29 TP_ARGS(tunnel), 34 memcpy(__entry->name, tunnel->name, L2TP_TUNNEL_NAME_MAX); 52 TP_PROTO(struct l2tp_tunnel *tunnel), 53 TP_ARGS(tunnel), 63 memcpy(__entry->name, tunnel->name, L2TP_TUNNEL_NAME_MAX); 64 __entry->fd = tunnel->fd; 65 __entry->tid = tunnel->tunnel_id; 66 __entry->ptid = tunnel->peer_tunnel_id; 67 __entry->version = tunnel->version; [all …]
|
| /linux/Documentation/networking/ |
| H A D | l2tp.rst | 27 An L2TP tunnel carries one or more L2TP sessions. Each tunnel is 30 to/from L2TP. Fields in the L2TP header identify the tunnel or session 40 1) Create a tunnel socket. Exchange L2TP control protocol messages 41 with the peer over that socket in order to establish a tunnel. 43 2) Create a tunnel context in the kernel, using information 47 tunnel socket in order to establish a session. 57 Tunnel Sockets 62 To create a tunnel socket for use by L2TP, the standard POSIX 65 For example, for a tunnel using IPv4 addresses and UDP encapsulation:: 69 Or for a tunnel using IPv6 addresses and IP encapsulation:: [all …]
|
| H A D | gtp.rst | 12 of a GTP tunnel endpoint. 17 GTP is the Generic Tunnel Protocol, which is a 3GPP protocol used for 24 such a tunnel between that external data network and the phone. The 25 tunnel endpoints thus reside on the phone and in the gateway. All 35 is translated into GTP *without breaking the end-to-end tunnel*. So 39 or P-GW (LTE), which terminates the tunnel, decapsulates the packet 53 The module implements the function of a tunnel endpoint, i.e. it is 70 to handle the tunnel establishment, authentication etc. and only the 159 Local GTP-U entity and tunnel identification 166 instance) per IP address. Tunnel Endpoint Identifier (TEID) are unique [all …]
|
| H A D | bareudp.rst | 11 The Bareudp tunnel module provides a generic L3 encapsulation support for 12 tunnelling different L3 protocols like MPLS, IP, NSH etc. inside a UDP tunnel. 31 This creates a bareudp tunnel device which tunnels L3 traffic with ethertype 45 For an IPv4 tunnel the multiproto mode allows the tunnel to also handle 50 For MPLS, the multiproto mode allows the tunnel to handle both unicast 56 The OVS or TC flower layer must set the tunnel information in the SKB dst field before 58 bareUDP device extracts and stores the tunnel information in the SKB dst field before
|
| /linux/include/uapi/linux/ |
| H A D | ip6_tunnel.h | 28 char name[IFNAMSIZ]; /* name of tunnel device */ 30 __u8 proto; /* tunnel protocol */ 31 __u8 encap_limit; /* encapsulation limit for tunnel */ 32 __u8 hop_limit; /* hop limit for tunnel */ 33 __be32 flowinfo; /* traffic class and flowlabel for tunnel */ 34 __u32 flags; /* tunnel flags */ 35 struct in6_addr laddr; /* local tunnel end-point address */ 36 struct in6_addr raddr; /* remote tunnel end-point address */ 40 char name[IFNAMSIZ]; /* name of tunnel device */ 42 __u8 proto; /* tunnel protoco [all...] |
| /linux/net/ipv4/ |
| H A D | ip_tunnel.c | 70 /* Fallback tunnel: no source, no destination, no key, no options 72 Tunnel hash table: 74 it will match only tunnel with the same key; if it is not present, 75 it will match only keyless tunnel. 78 will match fallback tunnel. 79 Given src, dst and key, find appropriate for input tunnel. 238 struct ip_tunnel *tunnel; in __ip_tunnel_create() local 264 tunnel = netdev_priv(dev); in __ip_tunnel_create() 265 tunnel->parms = *parms; in __ip_tunnel_create() 266 tunnel->net = net; in __ip_tunnel_create() [all …]
|
| H A D | ip_gre.c | 76 - traceroute does not work. I planned to relay ICMP from tunnel, 94 (branches, that exceed pmtu are pruned) and tunnel mtu 275 struct ip_tunnel *tunnel; in erspan_rcv() local 288 tunnel = ip_tunnel_lookup(itn, skb->dev->ifindex, flags, in erspan_rcv() 299 tunnel = ip_tunnel_lookup(itn, skb->dev->ifindex, flags, in erspan_rcv() 303 if (tunnel) { in erspan_rcv() 318 if (tunnel->collect_md) { in erspan_rcv() 356 ip_tunnel_rcv(tunnel, skb, tpi, tun_dst, log_ecn_error); in erspan_rcv() 371 struct ip_tunnel *tunnel; in __ipgre_rcv() local 374 tunnel = ip_tunnel_lookup(itn, skb->dev->ifindex, tpi->flags, in __ipgre_rcv() [all …]
|
| H A D | ip_vti.c | 4 * virtual tunnel interface 50 struct ip_tunnel *tunnel; in vti_input() local 58 tunnel = ip_tunnel_lookup(itn, skb->dev->ifindex, flags, in vti_input() 60 if (tunnel) { in vti_input() 64 XFRM_TUNNEL_SKB_CB(skb)->tunnel.ip4 = tunnel; in vti_input() 67 skb->dev = tunnel->dev; in vti_input() 103 struct ip_tunnel *tunnel = XFRM_TUNNEL_SKB_CB(skb)->tunnel.ip4; in vti_rcv_cb() local 107 if (!tunnel) in vti_rcv_cb() 110 dev = tunnel->dev; in vti_rcv_cb() 134 skb->mark = be32_to_cpu(tunnel->parms.i_key); in vti_rcv_cb() [all …]
|
| /linux/drivers/net/ |
| H A D | amt.c | 123 static u32 amt_source_hash(struct amt_tunnel_list *tunnel, union amt_addr *src) in amt_source_hash() argument 125 u32 hash = jhash(src, sizeof(*src), tunnel->amt->hash_seed); in amt_source_hash() 127 return reciprocal_scale(hash, tunnel->amt->hash_buckets); in amt_source_hash() 184 static struct amt_source_node *amt_lookup_src(struct amt_tunnel_list *tunnel, in amt_lookup_src() argument 189 u32 hash = amt_source_hash(tunnel, src); in amt_lookup_src() 200 static u32 amt_group_hash(struct amt_tunnel_list *tunnel, union amt_addr *group) in amt_group_hash() argument 202 u32 hash = jhash(group, sizeof(*group), tunnel->amt->hash_seed); in amt_group_hash() 204 return reciprocal_scale(hash, tunnel->amt->hash_buckets); in amt_group_hash() 207 static struct amt_group_node *amt_lookup_group(struct amt_tunnel_list *tunnel, in amt_lookup_group() argument 212 u32 hash = amt_group_hash(tunnel, group); in amt_lookup_group() [all …]
|
| /linux/net/ipv6/ |
| H A D | sit.c | 3 * IPv6 over IPv4 tunnel device - Simple Internet Transition (SIT) 74 static bool check_6rd(struct ip_tunnel *tunnel, const struct in6_addr *v6dst, 516 struct ip_tunnel *tunnel = netdev_priv(dev); in ipip6_tunnel_uninit() local 517 struct sit_net *sitn = net_generic(tunnel->net, sit_net_id); in ipip6_tunnel_uninit() 522 ipip6_tunnel_unlink(sitn, tunnel); in ipip6_tunnel_uninit() 523 ipip6_tunnel_del_prl(tunnel, NULL); in ipip6_tunnel_uninit() 525 dst_cache_reset(&tunnel->dst_cache); in ipip6_tunnel_uninit() 526 netdev_put(dev, &tunnel->dev_tracker); in ipip6_tunnel_uninit() 607 static inline bool is_spoofed_6rd(struct ip_tunnel *tunnel, const __be32 v4addr, in is_spoofed_6rd() argument 611 if (check_6rd(tunnel, v6addr, &v4embed) && v4addr != v4embed) in is_spoofed_6rd() [all …]
|
| H A D | ip6_tunnel.c | 87 /* the IPv6 tunnel fallback device */ 102 * ip6_tnl_lookup - fetch tunnel matching the end-point addresses 105 * @remote: the address of the tunnel exit-point 106 * @local: the address of the tunnel entry-point 109 * tunnel matching given end-points if found, 110 * else fallback tunnel if its device is up, 177 * ip6_tnl_bucket - get head of list matching given tunnel parameters 179 * @p: parameters containing tunnel end-points 185 * Return: head of IPv6 tunnel list 204 * ip6_tnl_link - add tunnel to hash table [all …]
|
| H A D | ip6_vti.c | 67 /* the vti6 tunnel fallback device */ 79 * vti6_tnl_lookup - fetch tunnel matching the end-point addresses 81 * @remote: the address of the tunnel exit-point 82 * @local: the address of the tunnel entry-point 85 * tunnel matching given end-points if found, 86 * else fallback tunnel if its device is up, 130 * vti6_tnl_bucket - get head of list matching given tunnel parameters 132 * @p: parameters containing tunnel end-points 138 * Return: head of IPv6 tunnel list 239 * vti6_locate - find or create tunnel matching given parameters [all …]
|
| /linux/include/net/ |
| H A D | ip6_tunnel.h | 22 char name[IFNAMSIZ]; /* name of tunnel device */ 24 __u8 proto; /* tunnel protocol */ 25 __u8 encap_limit; /* encapsulation limit for tunnel */ 26 __u8 hop_limit; /* hop limit for tunnel */ 28 __be32 flowinfo; /* traffic class and flowlabel for tunnel */ 29 __u32 flags; /* tunnel flags */ 30 struct in6_addr laddr; /* local tunnel end-point address */ 31 struct in6_addr raddr; /* remote tunnel end-point address */ 45 /* IPv6 tunnel */ 47 struct ip6_tnl __rcu *next; /* next tunnel in list */ [all …]
|
| /linux/tools/testing/selftests/bpf/prog_tests/ |
| H A D | test_tunnel.c | 4 * End-to-end eBPF tunnel test suite 5 * The file tests BPF network tunnel implementation. 24 * root namespace with metadata-mode tunnel + BPF 28 * tunnel dev <type>11, ex: gre11, IPv4: 10.1.1.200, IPv6: 1::22 (overlay) 30 * Namespace at_ns0 with native tunnel 33 * tunnel dev <type>00, ex: gre00, IPv4: 10.1.1.100, IPv6: 1::11 (overlay) 42 * 2) Tnl device's egress BPF program is triggered and set the tunnel metadata, 44 * the primary or secondary ip of veth1 as the local ip of tunnel. The 46 * 3) Outer tunnel header is prepended and route the packet to veth1's egress. 48 * 5) Tunnel protoco [all...] |
| /linux/drivers/net/ethernet/broadcom/bnxt/ |
| H A D | bnxt_tc.h | 88 /* tunnel encap */ 146 /* Tunnel encap/decap hash table 148 * the same tunnel encap/decap params (ip_daddrs, vni, udp_dport) 156 /* tunnel l2 info */ 160 /* tunnel handle returned by FW */ 168 * The same data-struct is used for L2-flow table and L2-tunnel table. 169 * The L2 part of a flow or tunnel is stored in a hash table. 171 * already existing flow/tunnel must refer to it's flow handle or 205 /* tunnel encap related */ 208 /* tunnel decap related */ [all …]
|
| /linux/tools/testing/selftests/bpf/ |
| H A D | test_tunnel.sh | |
| H A D | with_tunnels.sh | |
| /linux/tools/testing/selftests/net/ |
| H A D | l2tp.sh | 4 # L2TPv3 tunnel between 2 hosts 140 # configure l2tpv3 tunnel on host-1 142 ip -netns $host_1 l2tp add tunnel tunnel_id 1041 peer_tunnel_id 1042 \ 150 # configure l2tpv3 tunnel on host-2 152 ip -netns $host_2 l2tp add tunnel tunnel_id 1042 peer_tunnel_id 1041 \ 169 # configure l2tpv3 tunnel on host-1 171 ip -netns $host_1 l2tp add tunnel tunnel_id 1061 peer_tunnel_id 1062 \ 179 # configure l2tpv3 tunnel on host-2 181 ip -netns $host_2 l2tp add tunnel tunnel_id 1062 peer_tunnel_id 1061 \ 313 # generate traffic through tunnel for various cases [all …]
|
| H A D | xfrm_policy.sh | 10 # ns3 and ns4 are connected via ipsec tunnel. 12 # ns1: ping 10.0.2.2: passes via ipsec tunnel. 13 # ns2: ping 10.0.1.2: passes via ipsec tunnel. 15 # ns1: ping 10.0.1.253: passes via ipsec tunnel (direct policy) 16 # ns2: ping 10.0.2.253: passes via ipsec tunnel (direct policy) 18 # ns1: ping 10.0.2.254: does NOT pass via ipsec tunnel (exception) 19 # ns2: ping 10.0.1.254: does NOT pass via ipsec tunnel (exception) 38 … add src $lnet dst $rnet dir out tmpl src $me dst $remote proto esp mode tunnel priority 100 actio… 40 … add src $rnet dst $lnet dir fwd tmpl src $remote dst $me proto esp mode tunnel priority 100 actio… 52 …st $me proto esp spi $spi_in enc aes $KEY_AES auth sha1 $KEY_SHA mode tunnel sel src $rnet dst … [all …]
|
| H A D | vrf-xfrm-tests.sh | 218 tmpl src ${HOST1_4} dst ${HOST2_4} proto esp mode tunnel 223 tmpl src ${HOST1_4} dst ${HOST2_4} proto esp mode tunnel 228 tmpl src ${HOST2_4} dst ${HOST1_4} proto esp mode tunnel 233 tmpl src ${HOST2_4} dst ${HOST1_4} proto esp mode tunnel 239 tmpl src ${HOST1_6} dst ${HOST2_6} proto esp mode tunnel 244 tmpl src ${HOST1_6} dst ${HOST2_6} proto esp mode tunnel 249 tmpl src ${HOST2_6} dst ${HOST1_6} proto esp mode tunnel 254 tmpl src ${HOST2_6} dst ${HOST1_6} proto esp mode tunnel 260 proto esp spi ${SPI_1} reqid 0 mode tunnel \ 267 proto esp spi ${SPI_1} reqid 0 mode tunnel \ [all …]
|
| /linux/net/sched/ |
| H A D | act_tunnel_key.c | 102 NL_SET_ERR_MSG(extack, "Missing tunnel key geneve option class, type or data"); in tunnel_key_copy_geneve_opt() 109 NL_SET_ERR_MSG(extack, "Tunnel key geneve option data is less than 4 bytes long"); in tunnel_key_copy_geneve_opt() 113 NL_SET_ERR_MSG(extack, "Tunnel key geneve option data is not a multiple of 4 bytes long"); in tunnel_key_copy_geneve_opt() 150 NL_SET_ERR_MSG(extack, "Missing tunnel key vxlan option gbp"); in tunnel_key_copy_vxlan_opt() 178 NL_SET_ERR_MSG(extack, "Missing tunnel key erspan option ver"); in tunnel_key_copy_erspan_opt() 185 NL_SET_ERR_MSG(extack, "Missing tunnel key erspan option index"); in tunnel_key_copy_erspan_opt() 191 NL_SET_ERR_MSG(extack, "Missing tunnel key erspan option dir or hwid"); in tunnel_key_copy_erspan_opt() 195 NL_SET_ERR_MSG(extack, "Tunnel key erspan option ver is incorrect"); in tunnel_key_copy_erspan_opt() 241 NL_SET_ERR_MSG(extack, "Tunnel options exceeds max size"); in tunnel_key_copy_opts() 278 NL_SET_ERR_MSG(extack, "Empty list of tunnel options"); in tunnel_key_copy_opts() [all …]
|