l2tp: pppox protocol module load
Subsystems (2)
PATCH 4/5 l2tp: pppox protocol module load
[L2TP]: Add the ability to autoload a pppox protocol module.
This patch allows a name "pppox-proto-nnn" to be used in modprobe.conf to autoload a PPPoX protocol nnn.
drivers/net/pppox.c +7 -0
@@ -114,6 +114,13 @@ static int pppox_create(struct socket *s goto out; rc = -EPROTONOSUPPORT ; +#ifdef CONFIG_KMOD +if (!pppox_protos[protocol]) { +char buffer[32 ]; +sprintf (buffer,"pppox-proto-%d" , protocol); +request_module (buffer); + } +#endif if (!pppox_protos[protocol] || !try_module_get (pppox_protos[protocol]->owner)) goto out;
David Miller
maintainerFrom: James Chapman <[email protected]>
Date: Mon, 23 Apr 2007 17:01:03 +0100
Quoted 15 lines
[L2TP]: Add the ability to autoload a pppox protocol module.
This patch allows a name "pppox-proto-nnn" to be used in modprobe.conf to autoload a PPPoX protocol nnn.
Signed-off-by James Chapman <[email protected]>Index:
linux-2.6.21-rc7/drivers/net/pppox.c
===================================================================drivers/net/pppox.c +0
-0@@ -114,6 +114,13 @@ static int pppox_create(struct socket *s goto out; rc = -EPROTONOSUPPORT ;
drivers/net/pppox.c static int pppox_create(struct socket *s · line 126
Quoted 10 lines
drivers/net/pppox.c +7
-0+#ifdef CONFIG_KMOD +if (!pppox_protos[protocol]) { +char buffer[32 ]; +sprintf (buffer,"pppox-proto-%d" , protocol); +request_module (buffer); + } +#endif if (!pppox_protos[protocol] || !try_module_get (pppox_protos[protocol]->owner)) goto out;
If you're going to use an interface declared in linux/kmod.h you'll have to make sure that header file is included by pppox.c
I've made that fix and applied your patch, thanks.