Home
last modified time | relevance | path

Searched refs:tunnel (Results 1 – 25 of 40) sorted by relevance

12

/net/l2tp/
Dl2tp_core.c146 l2tp_session_id_hash(struct l2tp_tunnel *tunnel, u32 session_id) in l2tp_session_id_hash() argument
148 return &tunnel->session_hlist[hash_32(session_id, L2TP_HASH_BITS)]; in l2tp_session_id_hash()
151 static void l2tp_tunnel_free(struct l2tp_tunnel *tunnel) in l2tp_tunnel_free() argument
153 trace_free_tunnel(tunnel); in l2tp_tunnel_free()
154 sock_put(tunnel->sock); in l2tp_tunnel_free()
161 if (session->tunnel) in l2tp_session_free()
162 l2tp_tunnel_dec_refcount(session->tunnel); in l2tp_session_free()
168 struct l2tp_tunnel *tunnel = sk->sk_user_data; in l2tp_sk_to_tunnel() local
170 if (tunnel) in l2tp_sk_to_tunnel()
171 if (WARN_ON(tunnel->magic != L2TP_TUNNEL_MAGIC)) in l2tp_sk_to_tunnel()
[all …]
Dl2tp_ppp.c272 struct l2tp_tunnel *tunnel; in pppol2tp_sendmsg() local
285 tunnel = session->tunnel; in pppol2tp_sendmsg()
287 uhlen = (tunnel->encap == L2TP_ENCAPTYPE_UDP) ? sizeof(struct udphdr) : 0; in pppol2tp_sendmsg()
349 struct l2tp_tunnel *tunnel; in pppol2tp_xmit() local
360 tunnel = session->tunnel; in pppol2tp_xmit()
362 uhlen = (tunnel->encap == L2TP_ENCAPTYPE_UDP) ? sizeof(struct udphdr) : 0; in pppol2tp_xmit()
642 static int pppol2tp_tunnel_mtu(const struct l2tp_tunnel *tunnel) in pppol2tp_tunnel_mtu() argument
646 mtu = l2tp_tunnel_dst_mtu(tunnel); in pppol2tp_tunnel_mtu()
657 struct l2tp_tunnel *tunnel; in pppol2tp_tunnel_get() local
662 tunnel = l2tp_tunnel_get(net, info->tunnel_id); in pppol2tp_tunnel_get()
[all …]
Dl2tp_debugfs.c39 struct l2tp_tunnel *tunnel; member
46 if (pd->tunnel) in l2tp_dfs_next_tunnel()
47 l2tp_tunnel_dec_refcount(pd->tunnel); in l2tp_dfs_next_tunnel()
49 pd->tunnel = l2tp_tunnel_get_nth(pd->net, pd->tunnel_idx); in l2tp_dfs_next_tunnel()
59 pd->session = l2tp_session_get_nth(pd->tunnel, pd->session_idx); in l2tp_dfs_next_session()
82 if (!pd->tunnel) in l2tp_dfs_seq_start()
88 if (!pd->tunnel && !pd->session) in l2tp_dfs_seq_start()
115 if (pd->tunnel) { in l2tp_dfs_seq_stop()
116 l2tp_tunnel_dec_refcount(pd->tunnel); in l2tp_dfs_seq_stop()
117 pd->tunnel = NULL; in l2tp_dfs_seq_stop()
[all …]
Dl2tp_netlink.c38 int flags, struct l2tp_tunnel *tunnel, u8 cmd);
51 struct l2tp_tunnel *tunnel; in l2tp_nl_session_get() local
62 tunnel = l2tp_tunnel_get(net, tunnel_id); in l2tp_nl_session_get()
63 if (tunnel) { in l2tp_nl_session_get()
64 session = l2tp_tunnel_get_session(tunnel, session_id); in l2tp_nl_session_get()
65 l2tp_tunnel_dec_refcount(tunnel); in l2tp_nl_session_get()
104 struct l2tp_tunnel *tunnel, in l2tp_tunnel_notify() argument
115 NLM_F_ACK, tunnel, cmd); in l2tp_tunnel_notify()
192 struct l2tp_tunnel *tunnel; in l2tp_nl_cmd_tunnel_create() local
237 peer_tunnel_id, &cfg, &tunnel); in l2tp_nl_cmd_tunnel_create()
[all …]
Dtrace.h28 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 …]
Dl2tp_core.h74 struct l2tp_tunnel *tunnel; /* back pointer to tunnel context */ member
198 int (*session_create)(struct net *net, struct l2tp_tunnel *tunnel,
216 void l2tp_tunnel_inc_refcount(struct l2tp_tunnel *tunnel);
217 void l2tp_tunnel_dec_refcount(struct l2tp_tunnel *tunnel);
227 struct l2tp_session *l2tp_tunnel_get_session(struct l2tp_tunnel *tunnel,
231 struct l2tp_session *l2tp_session_get_nth(struct l2tp_tunnel *tunnel, int nth);
242 int l2tp_tunnel_register(struct l2tp_tunnel *tunnel, struct net *net,
244 void l2tp_tunnel_delete(struct l2tp_tunnel *tunnel);
247 struct l2tp_tunnel *tunnel,
251 struct l2tp_tunnel *tunnel);
[all …]
Dl2tp_eth.c204 static void l2tp_eth_adjust_mtu(struct l2tp_tunnel *tunnel, in l2tp_eth_adjust_mtu() argument
213 if (tunnel->encap == L2TP_ENCAPTYPE_UDP) { in l2tp_eth_adjust_mtu()
218 lock_sock(tunnel->sock); in l2tp_eth_adjust_mtu()
219 l3_overhead = kernel_sock_ip_overhead(tunnel->sock); in l2tp_eth_adjust_mtu()
220 release_sock(tunnel->sock); in l2tp_eth_adjust_mtu()
235 mtu = l2tp_tunnel_dst_mtu(tunnel) - overhead; in l2tp_eth_adjust_mtu()
244 static int l2tp_eth_create(struct net *net, struct l2tp_tunnel *tunnel, in l2tp_eth_create() argument
264 session = l2tp_session_create(sizeof(*spriv), tunnel, session_id, in l2tp_eth_create()
281 l2tp_eth_adjust_mtu(tunnel, session, dev); in l2tp_eth_create()
301 rc = l2tp_session_register(session, tunnel); in l2tp_eth_create()
DKconfig20 L2TP is often used to tunnel PPP traffic over IP
21 tunnels. One IP tunnel may carry thousands of individual PPP
30 userland daemon handles L2TP the control protocol (tunnel
68 tunnel raw ethernet frames using L2TP, say Y here. If
80 userspace L2TPv3 daemons may create L2TP/IP tunnel sockets
Dl2tp_ip.c121 struct l2tp_tunnel *tunnel = NULL; in l2tp_ip_recv() local
147 tunnel = session->tunnel; in l2tp_ip_recv()
148 if (!tunnel) in l2tp_ip_recv()
238 struct l2tp_tunnel *tunnel = l2tp_sk_to_tunnel(sk); in l2tp_ip_destroy_sock() local
244 if (tunnel) in l2tp_ip_destroy_sock()
245 l2tp_tunnel_delete(tunnel); in l2tp_ip_destroy_sock()
Dl2tp_ip6.c134 struct l2tp_tunnel *tunnel = NULL; in l2tp_ip6_recv() local
160 tunnel = session->tunnel; in l2tp_ip6_recv()
161 if (!tunnel) in l2tp_ip6_recv()
252 struct l2tp_tunnel *tunnel = l2tp_sk_to_tunnel(sk); in l2tp_ip6_destroy_sock() local
258 if (tunnel) in l2tp_ip6_destroy_sock()
259 l2tp_tunnel_delete(tunnel); in l2tp_ip6_destroy_sock()
/net/ipv4/
Dip_tunnel.c237 struct ip_tunnel *tunnel; in __ip_tunnel_create() local
263 tunnel = netdev_priv(dev); in __ip_tunnel_create()
264 tunnel->parms = *parms; in __ip_tunnel_create()
265 tunnel->net = net; in __ip_tunnel_create()
282 struct ip_tunnel *tunnel = netdev_priv(dev); in ip_tunnel_bind_dev() local
286 int t_hlen = tunnel->hlen + sizeof(struct iphdr); in ip_tunnel_bind_dev()
288 iph = &tunnel->parms.iph; in ip_tunnel_bind_dev()
296 iph->saddr, tunnel->parms.o_key, in ip_tunnel_bind_dev()
298 tunnel->parms.link, tunnel->fwmark, 0, 0); in ip_tunnel_bind_dev()
299 rt = ip_route_output_key(tunnel->net, &fl4); in ip_tunnel_bind_dev()
[all …]
Dip_gre.c269 struct ip_tunnel *tunnel; in erspan_rcv() local
279 tunnel = ip_tunnel_lookup(itn, skb->dev->ifindex, in erspan_rcv()
285 tunnel = ip_tunnel_lookup(itn, skb->dev->ifindex, in erspan_rcv()
290 if (tunnel) { in erspan_rcv()
305 if (tunnel->collect_md) { in erspan_rcv()
341 ip_tunnel_rcv(tunnel, skb, tpi, tun_dst, log_ecn_error); in erspan_rcv()
356 struct ip_tunnel *tunnel; in __ipgre_rcv() local
359 tunnel = ip_tunnel_lookup(itn, skb->dev->ifindex, tpi->flags, in __ipgre_rcv()
362 if (tunnel) { in __ipgre_rcv()
372 if (tunnel->dev->header_ops == &ipgre_header_ops) in __ipgre_rcv()
[all …]
Dipip.c217 struct ip_tunnel *tunnel; in ipip_tunnel_rcv() local
221 tunnel = ip_tunnel_lookup(itn, skb->dev->ifindex, TUNNEL_NO_KEY, in ipip_tunnel_rcv()
223 if (tunnel) { in ipip_tunnel_rcv()
226 if (tunnel->parms.iph.protocol != ipproto && in ipip_tunnel_rcv()
227 tunnel->parms.iph.protocol != 0) in ipip_tunnel_rcv()
240 if (tunnel->collect_md) { in ipip_tunnel_rcv()
247 return ip_tunnel_rcv(tunnel, skb, tpi, tun_dst, log_ecn_error); in ipip_tunnel_rcv()
276 struct ip_tunnel *tunnel = netdev_priv(dev); in ipip_tunnel_xmit() local
277 const struct iphdr *tiph = &tunnel->parms.iph; in ipip_tunnel_xmit()
304 if (tunnel->collect_md) in ipip_tunnel_xmit()
[all …]
Dip_vti.c50 struct ip_tunnel *tunnel; in vti_input() local
55 tunnel = ip_tunnel_lookup(itn, skb->dev->ifindex, TUNNEL_NO_KEY, in vti_input()
57 if (tunnel) { in vti_input()
61 XFRM_TUNNEL_SKB_CB(skb)->tunnel.ip4 = tunnel; in vti_input()
64 skb->dev = tunnel->dev; in vti_input()
100 struct ip_tunnel *tunnel = XFRM_TUNNEL_SKB_CB(skb)->tunnel.ip4; in vti_rcv_cb() local
104 if (!tunnel) in vti_rcv_cb()
107 dev = tunnel->dev; in vti_rcv_cb()
131 skb->mark = be32_to_cpu(tunnel->parms.i_key); in vti_rcv_cb()
138 skb_scrub_packet(skb, !net_eq(tunnel->net, dev_net(skb->dev))); in vti_rcv_cb()
[all …]
Dxfrm4_protocol.c68 XFRM_TUNNEL_SKB_CB(skb)->tunnel.ip4 = NULL; in xfrm4_rcv_encap()
101 XFRM_TUNNEL_SKB_CB(skb)->tunnel.ip4 = NULL; in xfrm4_esp_rcv()
129 XFRM_TUNNEL_SKB_CB(skb)->tunnel.ip4 = NULL; in xfrm4_ah_rcv()
157 XFRM_TUNNEL_SKB_CB(skb)->tunnel.ip4 = NULL; in xfrm4_ipcomp_rcv()
/net/ipv6/
Dsit.c71 static bool check_6rd(struct ip_tunnel *tunnel, const struct in6_addr *v6dst,
512 struct ip_tunnel *tunnel = netdev_priv(dev); in ipip6_tunnel_uninit() local
513 struct sit_net *sitn = net_generic(tunnel->net, sit_net_id); in ipip6_tunnel_uninit()
518 ipip6_tunnel_unlink(sitn, tunnel); in ipip6_tunnel_uninit()
519 ipip6_tunnel_del_prl(tunnel, NULL); in ipip6_tunnel_uninit()
521 dst_cache_reset(&tunnel->dst_cache); in ipip6_tunnel_uninit()
522 netdev_put(dev, &tunnel->dev_tracker); in ipip6_tunnel_uninit()
603 static inline bool is_spoofed_6rd(struct ip_tunnel *tunnel, const __be32 v4addr, in is_spoofed_6rd() argument
607 if (check_6rd(tunnel, v6addr, &v4embed) && v4addr != v4embed) in is_spoofed_6rd()
624 static bool only_dnatted(const struct ip_tunnel *tunnel, in only_dnatted() argument
[all …]
Dip6_gre.c491 struct ip6_tnl *tunnel; in ip6gre_rcv() local
494 tunnel = ip6gre_tunnel_lookup(skb->dev, in ip6gre_rcv()
497 if (tunnel) { in ip6gre_rcv()
498 if (tunnel->parms.collect_md) { in ip6gre_rcv()
510 ip6_tnl_rcv(tunnel, skb, tpi, tun_dst, log_ecn_error); in ip6gre_rcv()
512 ip6_tnl_rcv(tunnel, skb, tpi, NULL, log_ecn_error); in ip6gre_rcv()
528 struct ip6_tnl *tunnel; in ip6erspan_rcv() local
535 tunnel = ip6gre_tunnel_lookup(skb->dev, in ip6erspan_rcv()
538 if (tunnel) { in ip6erspan_rcv()
549 if (tunnel->parms.collect_md) { in ip6erspan_rcv()
[all …]
Dip6_tunnel.c791 static int __ip6_tnl_rcv(struct ip6_tnl *tunnel, struct sk_buff *skb, in __ip6_tnl_rcv() argument
803 (tunnel->parms.i_flags & TUNNEL_CSUM)) || in __ip6_tnl_rcv()
805 !(tunnel->parms.i_flags & TUNNEL_CSUM))) { in __ip6_tnl_rcv()
806 tunnel->dev->stats.rx_crc_errors++; in __ip6_tnl_rcv()
807 tunnel->dev->stats.rx_errors++; in __ip6_tnl_rcv()
811 if (tunnel->parms.i_flags & TUNNEL_SEQ) { in __ip6_tnl_rcv()
813 (tunnel->i_seqno && in __ip6_tnl_rcv()
814 (s32)(ntohl(tpi->seq) - tunnel->i_seqno) < 0)) { in __ip6_tnl_rcv()
815 tunnel->dev->stats.rx_fifo_errors++; in __ip6_tnl_rcv()
816 tunnel->dev->stats.rx_errors++; in __ip6_tnl_rcv()
[all …]
Dxfrm6_protocol.c69 XFRM_TUNNEL_SKB_CB(skb)->tunnel.ip6 = NULL; in xfrm6_rcv_encap()
114 XFRM_TUNNEL_SKB_CB(skb)->tunnel.ip6 = NULL; in xfrm6_esp_rcv()
143 XFRM_TUNNEL_SKB_CB(skb)->tunnel.ip6 = NULL; in xfrm6_ah_rcv()
172 XFRM_TUNNEL_SKB_CB(skb)->tunnel.ip6 = NULL; in xfrm6_ipcomp_rcv()
DKconfig162 encapsulating protocol. This can be used with xfrm mode tunnel to give
163 the notion of a secure tunnel for IPSEC and then use routing protocol
167 tristate "IPv6: IPv6-in-IPv4 tunnel (SIT driver)"
204 tristate "IPv6: IP-in-IPv6 tunnel (RFC2473)"
215 tristate "IPv6: GRE tunnel"
228 through the tunnel.
/net/mpls/
DKconfig34 tristate "MPLS: IP over MPLS tunnel support"
37 mpls ip tunnel support.
/net/netfilter/
Dnft_tunnel.c131 const struct nft_tunnel *tunnel; in nft_tunnel_get_reduce() local
138 tunnel = nft_expr_priv(track->regs[priv->dreg].selector); in nft_tunnel_get_reduce()
139 if (priv->key != tunnel->key || in nft_tunnel_get_reduce()
140 priv->dreg != tunnel->dreg || in nft_tunnel_get_reduce()
141 priv->mode != tunnel->mode) { in nft_tunnel_get_reduce()
/net/sched/
Dact_tunnel_key.c774 struct ip_tunnel_info *tunnel = priv; in tcf_tunnel_encap_put_tunnel() local
776 kfree(tunnel); in tcf_tunnel_encap_put_tunnel()
782 entry->tunnel = tcf_tunnel_info_copy(act); in tcf_tunnel_encap_get_tunnel()
783 if (!entry->tunnel) in tcf_tunnel_encap_get_tunnel()
786 entry->destructor_priv = entry->tunnel; in tcf_tunnel_encap_get_tunnel()
/net/xfrm/
Dxfrm_input.c534 if (XFRM_TUNNEL_SKB_CB(skb)->tunnel.ip4) in xfrm_input()
535 mark = be32_to_cpu(XFRM_TUNNEL_SKB_CB(skb)->tunnel.ip4->parms.i_key); in xfrm_input()
538 if (XFRM_TUNNEL_SKB_CB(skb)->tunnel.ip6) in xfrm_input()
539 mark = be32_to_cpu(XFRM_TUNNEL_SKB_CB(skb)->tunnel.ip6->parms.i_key); in xfrm_input()
/net/netfilter/ipvs/
Dip_vs_core.c1594 bool tunnel, new_cp = false; in ip_vs_in_icmp() local
1638 tunnel = false; in ip_vs_in_icmp()
1655 tunnel = true; in ip_vs_in_icmp()
1684 tunnel = true; in ip_vs_in_icmp()
1704 ip_vs_fill_iph_skb_icmp(AF_INET, skb, offset, !tunnel, &ciph); in ip_vs_in_icmp()
1716 if (tunnel || !sysctl_schedule_icmp(ipvs)) in ip_vs_in_icmp()
1734 if (tunnel) { in ip_vs_in_icmp()

12