2002-11-01 10:38:51

by Adam J. Richter

[permalink] [raw]
Subject: Patch?: linux-2.5.45/net - __secpath_destroy made net depend on ipv4

In linux-2.5.45, the core networking code calls
__secpath_destroy via the static inline routine secpath_put in
include/net/xfrm.h. However, __secpath destroy is defined in
ipv4. So, I believe that compiling networking without ipv4
will result in a kernel that fails to link (haven't actually
tried it), and it also causes problems for anyone who has
tweaked ipv4 into a loadable module (which is my case; I posted
patches long ago and would be happy to post them again if there
is interest).

Here is a possible patch that creates a secpath_destroy_hook,
although I hope that a cleaner and safer solution can be found (safer
because hook variables if multiple modules save and restore the old
values of the hook variable in some order other than
last-in-first-out).

I'm littering linux-kernel with this patch also because I
think __secpath_destroy comes from ipsec and those maintainers might
not be on the netdev and linux-net lists.

--
Adam J. Richter __ ______________ 575 Oroville Road
[email protected] \ / Milpitas, California 95035
+1 408 309-6081 | g g d r a s i l United States of America
"Free Software For The Rest Of Us."


Attachments:
(No filename) (1.18 kB)
secpath.diffs (2.48 kB)
Download all attachments

2002-11-01 11:00:00

by David Miller

[permalink] [raw]
Subject: Re: Patch?: linux-2.5.45/net - __secpath_destroy made net depend on ipv4

From: "Adam J. Richter" <[email protected]>
Date: Fri, 1 Nov 2002 03:45:00 -0800

In linux-2.5.45, the core networking code calls
__secpath_destroy via the static inline routine secpath_put in
include/net/xfrm.h.

Yes, we are fully aware of this. It will be fixed in due time,
please use CONFIG_INET=y kernels for the time being.