* [PATCH 4/5 2.6.21-rc7] l2tp: pppox protocol module load
@ 2007-04-23 12:56 James Chapman
0 siblings, 0 replies; 3+ messages in thread
From: James Chapman @ 2007-04-23 12:56 UTC (permalink / raw)
To: netdev
[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 <jchapman@katalix.com>
Index: linux-2.6.21-rc7/drivers/net/pppox.c
===================================================================
--- linux-2.6.21-rc7.orig/drivers/net/pppox.c
+++ linux-2.6.21-rc7/drivers/net/pppox.c
@@ -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;
^ permalink raw reply [flat|nested] 3+ messages in thread
* [PATCH 4/5 2.6.21-rc7] l2tp: pppox protocol module load
@ 2007-04-23 16:01 James Chapman
2007-04-30 7:21 ` David Miller
0 siblings, 1 reply; 3+ messages in thread
From: James Chapman @ 2007-04-23 16:01 UTC (permalink / raw)
To: netdev
[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 <jchapman@katalix.com>
Index: linux-2.6.21-rc7/drivers/net/pppox.c
===================================================================
--- linux-2.6.21-rc7.orig/drivers/net/pppox.c
+++ linux-2.6.21-rc7/drivers/net/pppox.c
@@ -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;
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH 4/5 2.6.21-rc7] l2tp: pppox protocol module load
2007-04-23 16:01 [PATCH 4/5 2.6.21-rc7] l2tp: pppox protocol module load James Chapman
@ 2007-04-30 7:21 ` David Miller
0 siblings, 0 replies; 3+ messages in thread
From: David Miller @ 2007-04-30 7:21 UTC (permalink / raw)
To: jchapman; +Cc: netdev
From: James Chapman <jchapman@katalix.com>
Date: Mon, 23 Apr 2007 17:01:03 +0100
> [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 <jchapman@katalix.com>
>
> Index: linux-2.6.21-rc7/drivers/net/pppox.c
> ===================================================================
> --- linux-2.6.21-rc7.orig/drivers/net/pppox.c
> +++ linux-2.6.21-rc7/drivers/net/pppox.c
> @@ -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;
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.
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2007-04-30 7:21 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-04-23 16:01 [PATCH 4/5 2.6.21-rc7] l2tp: pppox protocol module load James Chapman
2007-04-30 7:21 ` David Miller
-- strict thread matches above, loose matches on Subject: below --
2007-04-23 12:56 James Chapman
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).