l2tp: ignore L2TP_ATTR_VLAN_ID netlink attribute
authorGuillaume Nault <g.nault@alphalink.fr>
Fri, 27 Jul 2018 08:59:58 +0000 (10:59 +0200)
committerDavid S. Miller <davem@davemloft.net>
Fri, 27 Jul 2018 20:34:53 +0000 (13:34 -0700)
The value of this attribute is never used.

Signed-off-by: Guillaume Nault <g.nault@alphalink.fr>
Signed-off-by: David S. Miller <davem@davemloft.net>
include/uapi/linux/l2tp.h
net/l2tp/l2tp_core.h
net/l2tp/l2tp_netlink.c

index ae888606b3ec4b0166bc5ddf4f43e602641c09c1..41bf79a4b165be33de86e1244003297377f81d62 100644 (file)
@@ -60,7 +60,7 @@ struct sockaddr_l2tpip6 {
 /*
  * Commands.
  * Valid TLVs of each command are:-
- * TUNNEL_CREATE       - CONN_ID, pw_type, netns, ifname, ipinfo, udpinfo, udpcsum, vlanid
+ * TUNNEL_CREATE       - CONN_ID, pw_type, netns, ifname, ipinfo, udpinfo, udpcsum
  * TUNNEL_DELETE       - CONN_ID
  * TUNNEL_MODIFY       - CONN_ID, udpcsum
  * TUNNEL_GETSTATS     - CONN_ID, (stats)
@@ -105,7 +105,7 @@ enum {
        L2TP_ATTR_SESSION_ID,           /* u32 */
        L2TP_ATTR_PEER_SESSION_ID,      /* u32 */
        L2TP_ATTR_UDP_CSUM,             /* u8 */
-       L2TP_ATTR_VLAN_ID,              /* u16 */
+       L2TP_ATTR_VLAN_ID,              /* u16 (not used) */
        L2TP_ATTR_COOKIE,               /* 0, 4 or 8 bytes */
        L2TP_ATTR_PEER_COOKIE,          /* 0, 4 or 8 bytes */
        L2TP_ATTR_DEBUG,                /* u32, enum l2tp_debug_flags */
index 7dbfb55ab3b5328783790c9755fa981703a3575c..49fd5e05538ce61e02aa5e270209912a839f4c29 100644 (file)
@@ -54,7 +54,6 @@ struct l2tp_session_cfg {
                                                 * control of LNS. */
        int                     debug;          /* bitmask of debug message
                                                 * categories */
-       u16                     vlan_id;        /* VLAN pseudowire only */
        u16                     l2specific_type; /* Layer 2 specific type */
        u8                      cookie[8];      /* optional cookie */
        int                     cookie_len;     /* 0, 4 or 8 bytes */
index e4785f6966f6b11ba1081f86e08493e5d5d52745..8ea1deefbc3736a4e05ea96b2295eaed82fadb3f 100644 (file)
@@ -591,9 +591,6 @@ static int l2tp_nl_cmd_session_create(struct sk_buff *skb, struct genl_info *inf
                }
                if (info->attrs[L2TP_ATTR_IFNAME])
                        cfg.ifname = nla_data(info->attrs[L2TP_ATTR_IFNAME]);
-
-               if (info->attrs[L2TP_ATTR_VLAN_ID])
-                       cfg.vlan_id = nla_get_u16(info->attrs[L2TP_ATTR_VLAN_ID]);
        }
 
        if (info->attrs[L2TP_ATTR_DEBUG])