Message ID | 1400188890-2038-1-git-send-email-teg@jklm.no |
---|---|
State | Accepted, archived |
Delegated to: | David Miller |
Headers | show |
From: Tom Gundersen <teg@jklm.no> Date: Thu, 15 May 2014 23:21:30 +0200 > Enable the module alias hookup to allow tunnel modules to be autoloaded on demand. > > This is in line with how most other netdev kinds work, and will allow userspace > to create tunnels without having CAP_SYS_MODULE. > > Signed-off-by: Tom Gundersen <teg@jklm.no> > --- > v2: add ';' > > Hi Dave, > > I must have sent out the wrong version of this patch. Sorry for the inconvenience! Applied to net-next, although I never saw a firm conclusion in the thread for the original patch where there was a discussion about whether this is already possible or not. -- To unsubscribe from this list: send the line "unsubscribe netdev" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
On Wed, May 21, 2014 at 9:47 PM, David Miller <davem@davemloft.net> wrote: > From: Tom Gundersen <teg@jklm.no> > Date: Thu, 15 May 2014 23:21:30 +0200 > >> Enable the module alias hookup to allow tunnel modules to be autoloaded on demand. >> >> This is in line with how most other netdev kinds work, and will allow userspace >> to create tunnels without having CAP_SYS_MODULE. >> >> Signed-off-by: Tom Gundersen <teg@jklm.no> >> --- >> v2: add ';' >> >> Hi Dave, >> >> I must have sent out the wrong version of this patch. Sorry for the inconvenience! > > Applied to net-next Thanks! > although I never saw a firm conclusion in the > thread for the original patch where there was a discussion about > whether this is already possible or not. It is my understanding that this is not already possible, which is why the MODULE_ALIAS_RTNL_LINK exists. Would this patch be suitable for stable? While it does not fix a regression, it appears to fix the intended behaviour of MODULE_ALIAS_RTNL_LINK? What I'll do in userspace is to drop CAP_SYS_MODULE and just tell people who want tunnels to wait for a new kernel (or backport the patch), but having it in stable would obviously make it simpler. Cheers, Tom -- To unsubscribe from this list: send the line "unsubscribe netdev" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
From: Tom Gundersen <teg@jklm.no> Date: Mon, 2 Jun 2014 20:57:02 +0200 > Would this patch be suitable for stable? While it does not fix a > regression, it appears to fix the intended behaviour of > MODULE_ALIAS_RTNL_LINK? It probably is suitable... I'll queue it up, thanks. -- To unsubscribe from this list: send the line "unsubscribe netdev" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
diff --git a/net/ipv4/ipip.c b/net/ipv4/ipip.c index 812b183..4bc508f 100644 --- a/net/ipv4/ipip.c +++ b/net/ipv4/ipip.c @@ -486,4 +486,5 @@ static void __exit ipip_fini(void) module_init(ipip_init); module_exit(ipip_fini); MODULE_LICENSE("GPL"); +MODULE_ALIAS_RTNL_LINK("ipip"); MODULE_ALIAS_NETDEV("tunl0"); diff --git a/net/ipv6/ip6_tunnel.c b/net/ipv6/ip6_tunnel.c index b05b609..fe61545 100644 --- a/net/ipv6/ip6_tunnel.c +++ b/net/ipv6/ip6_tunnel.c @@ -61,6 +61,7 @@ MODULE_AUTHOR("Ville Nuorvala"); MODULE_DESCRIPTION("IPv6 tunneling device"); MODULE_LICENSE("GPL"); +MODULE_ALIAS_RTNL_LINK("ip6tnl"); MODULE_ALIAS_NETDEV("ip6tnl0"); #ifdef IP6_TNL_DEBUG diff --git a/net/ipv6/sit.c b/net/ipv6/sit.c index e5a453c..f438004 100644 --- a/net/ipv6/sit.c +++ b/net/ipv6/sit.c @@ -1828,4 +1828,5 @@ xfrm_tunnel_failed: module_init(sit_init); module_exit(sit_cleanup); MODULE_LICENSE("GPL"); +MODULE_ALIAS_RTNL_LINK("sit"); MODULE_ALIAS_NETDEV("sit0");
Enable the module alias hookup to allow tunnel modules to be autoloaded on demand. This is in line with how most other netdev kinds work, and will allow userspace to create tunnels without having CAP_SYS_MODULE. Signed-off-by: Tom Gundersen <teg@jklm.no> --- v2: add ';' Hi Dave, I must have sent out the wrong version of this patch. Sorry for the inconvenience! Cheers, Tom net/ipv4/ipip.c | 1 + net/ipv6/ip6_tunnel.c | 1 + net/ipv6/sit.c | 1 + 3 files changed, 3 insertions(+)