aboutsummaryrefslogtreecommitdiffstats
path: root/net/l2tp
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2012-10-02 16:38:27 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2012-10-02 16:38:27 -0400
commitaecdc33e111b2c447b622e287c6003726daa1426 (patch)
tree3e7657eae4b785e1a1fb5dfb225dbae0b2f0cfc6 /net/l2tp
parenta20acf99f75e49271381d65db097c9763060a1e8 (diff)
parenta3a6cab5ea10cca64d036851fe0d932448f2fe4f (diff)
Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next
Pull networking changes from David Miller: 1) GRE now works over ipv6, from Dmitry Kozlov. 2) Make SCTP more network namespace aware, from Eric Biederman. 3) TEAM driver now works with non-ethernet devices, from Jiri Pirko. 4) Make openvswitch network namespace aware, from Pravin B Shelar. 5) IPV6 NAT implementation, from Patrick McHardy. 6) Server side support for TCP Fast Open, from Jerry Chu and others. 7) Packet BPF filter supports MOD and XOR, from Eric Dumazet and Daniel Borkmann. 8) Increate the loopback default MTU to 64K, from Eric Dumazet. 9) Use a per-task rather than per-socket page fragment allocator for outgoing networking traffic. This benefits processes that have very many mostly idle sockets, which is quite common. From Eric Dumazet. 10) Use up to 32K for page fragment allocations, with fallbacks to smaller sizes when higher order page allocations fail. Benefits are a) less segments for driver to process b) less calls to page allocator c) less waste of space. From Eric Dumazet. 11) Allow GRO to be used on GRE tunnels, from Eric Dumazet. 12) VXLAN device driver, one way to handle VLAN issues such as the limitation of 4096 VLAN IDs yet still have some level of isolation. From Stephen Hemminger. 13) As usual there is a large boatload of driver changes, with the scale perhaps tilted towards the wireless side this time around. Fix up various fairly trivial conflicts, mostly caused by the user namespace changes. * git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next: (1012 commits) hyperv: Add buffer for extended info after the RNDIS response message. hyperv: Report actual status in receive completion packet hyperv: Remove extra allocated space for recv_pkt_list elements hyperv: Fix page buffer handling in rndis_filter_send_request() hyperv: Fix the missing return value in rndis_filter_set_packet_filter() hyperv: Fix the max_xfer_size in RNDIS initialization vxlan: put UDP socket in correct namespace vxlan: Depend on CONFIG_INET sfc: Fix the reported priorities of different filter types sfc: Remove EFX_FILTER_FLAG_RX_OVERRIDE_IP sfc: Fix loopback self-test with separate_tx_channels=1 sfc: Fix MCDI structure field lookup sfc: Add parentheses around use of bitfield macro arguments sfc: Fix null function pointer in efx_sriov_channel_type vxlan: virtual extensible lan igmp: export symbol ip_mc_leave_group netlink: add attributes to fdb interface tg3: unconditionally select HWMON support when tg3 is enabled. Revert "net: ti cpsw ethernet: allow reading phy interface mode from DT" gre: fix sparse warning ...
Diffstat (limited to 'net/l2tp')
-rw-r--r--net/l2tp/Kconfig1
-rw-r--r--net/l2tp/l2tp_eth.c3
-rw-r--r--net/l2tp/l2tp_netlink.c24
3 files changed, 15 insertions, 13 deletions
diff --git a/net/l2tp/Kconfig b/net/l2tp/Kconfig
index 4b1e71751e10..147a8fd47a17 100644
--- a/net/l2tp/Kconfig
+++ b/net/l2tp/Kconfig
@@ -4,6 +4,7 @@
4 4
5menuconfig L2TP 5menuconfig L2TP
6 tristate "Layer Two Tunneling Protocol (L2TP)" 6 tristate "Layer Two Tunneling Protocol (L2TP)"
7 depends on (IPV6 || IPV6=n)
7 depends on INET 8 depends on INET
8 ---help--- 9 ---help---
9 Layer Two Tunneling Protocol 10 Layer Two Tunneling Protocol
diff --git a/net/l2tp/l2tp_eth.c b/net/l2tp/l2tp_eth.c
index 3bfb34aaee29..37b8b8ba31f7 100644
--- a/net/l2tp/l2tp_eth.c
+++ b/net/l2tp/l2tp_eth.c
@@ -67,6 +67,7 @@ static inline struct l2tp_eth_net *l2tp_eth_pernet(struct net *net)
67 return net_generic(net, l2tp_eth_net_id); 67 return net_generic(net, l2tp_eth_net_id);
68} 68}
69 69
70static struct lock_class_key l2tp_eth_tx_busylock;
70static int l2tp_eth_dev_init(struct net_device *dev) 71static int l2tp_eth_dev_init(struct net_device *dev)
71{ 72{
72 struct l2tp_eth *priv = netdev_priv(dev); 73 struct l2tp_eth *priv = netdev_priv(dev);
@@ -74,7 +75,7 @@ static int l2tp_eth_dev_init(struct net_device *dev)
74 priv->dev = dev; 75 priv->dev = dev;
75 eth_hw_addr_random(dev); 76 eth_hw_addr_random(dev);
76 memset(&dev->broadcast[0], 0xff, 6); 77 memset(&dev->broadcast[0], 0xff, 6);
77 78 dev->qdisc_tx_busylock = &l2tp_eth_tx_busylock;
78 return 0; 79 return 0;
79} 80}
80 81
diff --git a/net/l2tp/l2tp_netlink.c b/net/l2tp/l2tp_netlink.c
index 6f936358d664..6c4cc12c7414 100644
--- a/net/l2tp/l2tp_netlink.c
+++ b/net/l2tp/l2tp_netlink.c
@@ -78,7 +78,7 @@ static int l2tp_nl_cmd_noop(struct sk_buff *skb, struct genl_info *info)
78 goto out; 78 goto out;
79 } 79 }
80 80
81 hdr = genlmsg_put(msg, info->snd_pid, info->snd_seq, 81 hdr = genlmsg_put(msg, info->snd_portid, info->snd_seq,
82 &l2tp_nl_family, 0, L2TP_CMD_NOOP); 82 &l2tp_nl_family, 0, L2TP_CMD_NOOP);
83 if (!hdr) { 83 if (!hdr) {
84 ret = -EMSGSIZE; 84 ret = -EMSGSIZE;
@@ -87,7 +87,7 @@ static int l2tp_nl_cmd_noop(struct sk_buff *skb, struct genl_info *info)
87 87
88 genlmsg_end(msg, hdr); 88 genlmsg_end(msg, hdr);
89 89
90 return genlmsg_unicast(genl_info_net(info), msg, info->snd_pid); 90 return genlmsg_unicast(genl_info_net(info), msg, info->snd_portid);
91 91
92err_out: 92err_out:
93 nlmsg_free(msg); 93 nlmsg_free(msg);
@@ -235,7 +235,7 @@ out:
235 return ret; 235 return ret;
236} 236}
237 237
238static int l2tp_nl_tunnel_send(struct sk_buff *skb, u32 pid, u32 seq, int flags, 238static int l2tp_nl_tunnel_send(struct sk_buff *skb, u32 portid, u32 seq, int flags,
239 struct l2tp_tunnel *tunnel) 239 struct l2tp_tunnel *tunnel)
240{ 240{
241 void *hdr; 241 void *hdr;
@@ -248,7 +248,7 @@ static int l2tp_nl_tunnel_send(struct sk_buff *skb, u32 pid, u32 seq, int flags,
248 struct l2tp_stats stats; 248 struct l2tp_stats stats;
249 unsigned int start; 249 unsigned int start;
250 250
251 hdr = genlmsg_put(skb, pid, seq, &l2tp_nl_family, flags, 251 hdr = genlmsg_put(skb, portid, seq, &l2tp_nl_family, flags,
252 L2TP_CMD_TUNNEL_GET); 252 L2TP_CMD_TUNNEL_GET);
253 if (!hdr) 253 if (!hdr)
254 return -EMSGSIZE; 254 return -EMSGSIZE;
@@ -359,12 +359,12 @@ static int l2tp_nl_cmd_tunnel_get(struct sk_buff *skb, struct genl_info *info)
359 goto out; 359 goto out;
360 } 360 }
361 361
362 ret = l2tp_nl_tunnel_send(msg, info->snd_pid, info->snd_seq, 362 ret = l2tp_nl_tunnel_send(msg, info->snd_portid, info->snd_seq,
363 NLM_F_ACK, tunnel); 363 NLM_F_ACK, tunnel);
364 if (ret < 0) 364 if (ret < 0)
365 goto err_out; 365 goto err_out;
366 366
367 return genlmsg_unicast(net, msg, info->snd_pid); 367 return genlmsg_unicast(net, msg, info->snd_portid);
368 368
369err_out: 369err_out:
370 nlmsg_free(msg); 370 nlmsg_free(msg);
@@ -384,7 +384,7 @@ static int l2tp_nl_cmd_tunnel_dump(struct sk_buff *skb, struct netlink_callback
384 if (tunnel == NULL) 384 if (tunnel == NULL)
385 goto out; 385 goto out;
386 386
387 if (l2tp_nl_tunnel_send(skb, NETLINK_CB(cb->skb).pid, 387 if (l2tp_nl_tunnel_send(skb, NETLINK_CB(cb->skb).portid,
388 cb->nlh->nlmsg_seq, NLM_F_MULTI, 388 cb->nlh->nlmsg_seq, NLM_F_MULTI,
389 tunnel) <= 0) 389 tunnel) <= 0)
390 goto out; 390 goto out;
@@ -604,7 +604,7 @@ out:
604 return ret; 604 return ret;
605} 605}
606 606
607static int l2tp_nl_session_send(struct sk_buff *skb, u32 pid, u32 seq, int flags, 607static int l2tp_nl_session_send(struct sk_buff *skb, u32 portid, u32 seq, int flags,
608 struct l2tp_session *session) 608 struct l2tp_session *session)
609{ 609{
610 void *hdr; 610 void *hdr;
@@ -616,7 +616,7 @@ static int l2tp_nl_session_send(struct sk_buff *skb, u32 pid, u32 seq, int flags
616 616
617 sk = tunnel->sock; 617 sk = tunnel->sock;
618 618
619 hdr = genlmsg_put(skb, pid, seq, &l2tp_nl_family, flags, L2TP_CMD_SESSION_GET); 619 hdr = genlmsg_put(skb, portid, seq, &l2tp_nl_family, flags, L2TP_CMD_SESSION_GET);
620 if (!hdr) 620 if (!hdr)
621 return -EMSGSIZE; 621 return -EMSGSIZE;
622 622
@@ -705,12 +705,12 @@ static int l2tp_nl_cmd_session_get(struct sk_buff *skb, struct genl_info *info)
705 goto out; 705 goto out;
706 } 706 }
707 707
708 ret = l2tp_nl_session_send(msg, info->snd_pid, info->snd_seq, 708 ret = l2tp_nl_session_send(msg, info->snd_portid, info->snd_seq,
709 0, session); 709 0, session);
710 if (ret < 0) 710 if (ret < 0)
711 goto err_out; 711 goto err_out;
712 712
713 return genlmsg_unicast(genl_info_net(info), msg, info->snd_pid); 713 return genlmsg_unicast(genl_info_net(info), msg, info->snd_portid);
714 714
715err_out: 715err_out:
716 nlmsg_free(msg); 716 nlmsg_free(msg);
@@ -742,7 +742,7 @@ static int l2tp_nl_cmd_session_dump(struct sk_buff *skb, struct netlink_callback
742 continue; 742 continue;
743 } 743 }
744 744
745 if (l2tp_nl_session_send(skb, NETLINK_CB(cb->skb).pid, 745 if (l2tp_nl_session_send(skb, NETLINK_CB(cb->skb).portid,
746 cb->nlh->nlmsg_seq, NLM_F_MULTI, 746 cb->nlh->nlmsg_seq, NLM_F_MULTI,
747 session) <= 0) 747 session) <= 0)
748 break; 748 break;