|
@@ -788,25 +788,20 @@ end:
|
|
|
|
|
|
#ifdef CONFIG_L2TP_V3
|
|
|
|
|
|
-/* Called when creating sessions via the netlink interface.
|
|
|
- */
|
|
|
-static int pppol2tp_session_create(struct net *net, u32 tunnel_id, u32 session_id, u32 peer_session_id, struct l2tp_session_cfg *cfg)
|
|
|
+/* Called when creating sessions via the netlink interface. */
|
|
|
+static int pppol2tp_session_create(struct net *net, struct l2tp_tunnel *tunnel,
|
|
|
+ u32 session_id, u32 peer_session_id,
|
|
|
+ struct l2tp_session_cfg *cfg)
|
|
|
{
|
|
|
int error;
|
|
|
- struct l2tp_tunnel *tunnel;
|
|
|
struct l2tp_session *session;
|
|
|
struct pppol2tp_session *ps;
|
|
|
|
|
|
- tunnel = l2tp_tunnel_find(net, tunnel_id);
|
|
|
-
|
|
|
- /* Error if we can't find the tunnel */
|
|
|
- error = -ENOENT;
|
|
|
- if (tunnel == NULL)
|
|
|
- goto out;
|
|
|
-
|
|
|
/* Error if tunnel socket is not prepped */
|
|
|
- if (tunnel->sock == NULL)
|
|
|
+ if (!tunnel->sock) {
|
|
|
+ error = -ENOENT;
|
|
|
goto out;
|
|
|
+ }
|
|
|
|
|
|
/* Default MTU values. */
|
|
|
if (cfg->mtu == 0)
|