]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
l2tp: remove unused tunnel magic field
authorJames Chapman <jchapman@katalix.com>
Mon, 29 Jul 2024 15:38:05 +0000 (16:38 +0100)
committerDavid S. Miller <davem@davemloft.net>
Wed, 31 Jul 2024 08:25:13 +0000 (09:25 +0100)
Since l2tp no longer derives tunnel pointers directly via
sk_user_data, it is no longer useful for l2tp to check tunnel pointers
using a magic feather. Drop the tunnel's magic field.

Signed-off-by: James Chapman <jchapman@katalix.com>
Signed-off-by: Tom Parkin <tparkin@katalix.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/l2tp/l2tp_core.c
net/l2tp/l2tp_core.h

index 59a171fa1a39a9311f34a636bd3e519ee09d680c..1ef14f99e78c3d496f6ad6bd9cfc4dce745987c1 100644 (file)
@@ -1527,7 +1527,6 @@ int l2tp_tunnel_create(int fd, int version, u32 tunnel_id, u32 peer_tunnel_id,
        tunnel->tunnel_id = tunnel_id;
        tunnel->peer_tunnel_id = peer_tunnel_id;
 
-       tunnel->magic = L2TP_TUNNEL_MAGIC;
        sprintf(&tunnel->name[0], "tunl %u", tunnel_id);
        spin_lock_init(&tunnel->list_lock);
        tunnel->acpt_newsess = true;
index a41cf6795df0c3e0ede80ce16b08a6e31f72fa2f..50107531fe3be2852b4ca8c4d28cb9e775a64f5b 100644 (file)
@@ -16,7 +16,6 @@
 #endif
 
 /* Random numbers used for internal consistency checks of tunnel and session structures */
-#define L2TP_TUNNEL_MAGIC      0x42114DDA
 #define L2TP_SESSION_MAGIC     0x0C04EB7D
 
 struct sk_buff;
@@ -155,8 +154,6 @@ struct l2tp_tunnel_cfg {
  */
 #define L2TP_TUNNEL_NAME_MAX 20
 struct l2tp_tunnel {
-       int                     magic;          /* Should be L2TP_TUNNEL_MAGIC */
-
        unsigned long           dead;
 
        struct rcu_head rcu;