Patch "l2tp: generate correct module alias strings" has been added to the 6.2-stable tree

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



This is a note to let you know that I've just added the patch titled

    l2tp: generate correct module alias strings

to the 6.2-stable tree which can be found at:
    http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary

The filename of the patch is:
     l2tp-generate-correct-module-alias-strings.patch
and it can be found in the queue-6.2 subdirectory.

If you, or anyone else, feels it should not be added to the stable tree,
please let <stable@xxxxxxxxxxxxxxx> know about it.



commit 12de266019186d49559737a12292ab5272a47c90
Author: Andrea Righi <andrea.righi@xxxxxxxxxxxxx>
Date:   Thu Mar 30 11:54:42 2023 +0200

    l2tp: generate correct module alias strings
    
    [ Upstream commit 154e07c164859fc90bf4e8143f2f6c1af9f3a35e ]
    
    Commit 65b32f801bfb ("uapi: move IPPROTO_L2TP to in.h") moved the
    definition of IPPROTO_L2TP from a define to an enum, but since
    __stringify doesn't work properly with enums, we ended up breaking the
    modalias strings for the l2tp modules:
    
     $ modinfo l2tp_ip l2tp_ip6 | grep alias
     alias:          net-pf-2-proto-IPPROTO_L2TP
     alias:          net-pf-2-proto-2-type-IPPROTO_L2TP
     alias:          net-pf-10-proto-IPPROTO_L2TP
     alias:          net-pf-10-proto-2-type-IPPROTO_L2TP
    
    Use the resolved number directly in MODULE_ALIAS_*() macros (as we
    already do with SOCK_DGRAM) to fix the alias strings:
    
    $ modinfo l2tp_ip l2tp_ip6 | grep alias
    alias:          net-pf-2-proto-115
    alias:          net-pf-2-proto-115-type-2
    alias:          net-pf-10-proto-115
    alias:          net-pf-10-proto-115-type-2
    
    Moreover, fix the ordering of the parameters passed to
    MODULE_ALIAS_NET_PF_PROTO_TYPE() by switching proto and type.
    
    Fixes: 65b32f801bfb ("uapi: move IPPROTO_L2TP to in.h")
    Link: https://lore.kernel.org/lkml/ZCQt7hmodtUaBlCP@righiandr-XPS-13-7390
    Signed-off-by: Guillaume Nault <gnault@xxxxxxxxxx>
    Signed-off-by: Andrea Righi <andrea.righi@xxxxxxxxxxxxx>
    Reviewed-by: Wojciech Drewek <wojciech.drewek@xxxxxxxxx>
    Tested-by:  Wojciech Drewek <wojciech.drewek@xxxxxxxxx>
    Signed-off-by: David S. Miller <davem@xxxxxxxxxxxxx>
    Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx>

diff --git a/net/l2tp/l2tp_ip.c b/net/l2tp/l2tp_ip.c
index 4db5a554bdbd9..41a74fc84ca13 100644
--- a/net/l2tp/l2tp_ip.c
+++ b/net/l2tp/l2tp_ip.c
@@ -677,8 +677,8 @@ MODULE_AUTHOR("James Chapman <jchapman@xxxxxxxxxxx>");
 MODULE_DESCRIPTION("L2TP over IP");
 MODULE_VERSION("1.0");
 
-/* Use the value of SOCK_DGRAM (2) directory, because __stringify doesn't like
- * enums
+/* Use the values of SOCK_DGRAM (2) as type and IPPROTO_L2TP (115) as protocol,
+ * because __stringify doesn't like enums
  */
-MODULE_ALIAS_NET_PF_PROTO_TYPE(PF_INET, 2, IPPROTO_L2TP);
-MODULE_ALIAS_NET_PF_PROTO(PF_INET, IPPROTO_L2TP);
+MODULE_ALIAS_NET_PF_PROTO_TYPE(PF_INET, 115, 2);
+MODULE_ALIAS_NET_PF_PROTO(PF_INET, 115);
diff --git a/net/l2tp/l2tp_ip6.c b/net/l2tp/l2tp_ip6.c
index 2478aa60145fb..5137ea1861ce2 100644
--- a/net/l2tp/l2tp_ip6.c
+++ b/net/l2tp/l2tp_ip6.c
@@ -806,8 +806,8 @@ MODULE_AUTHOR("Chris Elston <celston@xxxxxxxxxxx>");
 MODULE_DESCRIPTION("L2TP IP encapsulation for IPv6");
 MODULE_VERSION("1.0");
 
-/* Use the value of SOCK_DGRAM (2) directory, because __stringify doesn't like
- * enums
+/* Use the values of SOCK_DGRAM (2) as type and IPPROTO_L2TP (115) as protocol,
+ * because __stringify doesn't like enums
  */
-MODULE_ALIAS_NET_PF_PROTO_TYPE(PF_INET6, 2, IPPROTO_L2TP);
-MODULE_ALIAS_NET_PF_PROTO(PF_INET6, IPPROTO_L2TP);
+MODULE_ALIAS_NET_PF_PROTO_TYPE(PF_INET6, 115, 2);
+MODULE_ALIAS_NET_PF_PROTO(PF_INET6, 115);



[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux