From: Kunihiro Ishiguro <kunihiro@ipinfusion.com>
To: Matthias Andree <matthias.andree@gmx.de>, rct@gherkin.frus.com
Cc: Kernel Mailing List <linux-kernel@vger.kernel.org>
Subject: Re: Linux v2.5.61
Date: Sat, 15 Feb 2003 17:58:26 -0800 [thread overview]
Message-ID: <87ptptx9z1.wl@ipinfusion.com> (raw)
In-Reply-To: <20030215135345.GA16783@merlin.emma.line.org>
[-- Attachment #1: Type: text/plain, Size: 203 bytes --]
>Well, the kernel doesn't link for me when IPV6 is compiled as a module (config
>below) -- linking IPv6 in is fine.
Here is a fix for xfrm6_get_type() link problem when IPv6 is
configured as a module.
[-- Attachment #2: xfrm6_get_type.diff --]
[-- Type: application/octet-stream, Size: 3718 bytes --]
diff -ruN linux-2.5.61.orig/net/ipv4/xfrm_policy.c linux-2.5.61/net/ipv4/xfrm_policy.c
--- linux-2.5.61.orig/net/ipv4/xfrm_policy.c 2003-02-14 15:51:45.000000000 -0800
+++ linux-2.5.61/net/ipv4/xfrm_policy.c 2003-02-15 16:11:43.000000000 -0800
@@ -1228,3 +1228,48 @@
xfrm_state_init();
xfrm_input_init();
}
+
+#if defined(CONFIG_IPV6) || defined(CONFIG_IPV6_MODULE)
+
+static struct xfrm_type *xfrm6_type_map[256];
+static rwlock_t xfrm6_type_lock = RW_LOCK_UNLOCKED;
+
+int xfrm6_register_type(struct xfrm_type *type)
+{
+ int err = 0;
+
+ write_lock(&xfrm6_type_lock);
+ if (xfrm6_type_map[type->proto] == NULL)
+ xfrm6_type_map[type->proto] = type;
+ else
+ err = -EEXIST;
+ write_unlock(&xfrm6_type_lock);
+ return err;
+}
+
+int xfrm6_unregister_type(struct xfrm_type *type)
+{
+ int err = 0;
+
+ write_lock(&xfrm6_type_lock);
+ if (xfrm6_type_map[type->proto] != type)
+ err = -ENOENT;
+ else
+ xfrm6_type_map[type->proto] = NULL;
+ write_unlock(&xfrm6_type_lock);
+ return err;
+}
+
+struct xfrm_type *xfrm6_get_type(u8 proto)
+{
+ struct xfrm_type *type;
+
+ read_lock(&xfrm6_type_lock);
+ type = xfrm6_type_map[proto];
+ if (type && !try_module_get(type->owner))
+ type = NULL;
+ read_unlock(&xfrm6_type_lock);
+ return type;
+}
+
+#endif
diff -ruN linux-2.5.61.orig/net/ipv6/Makefile linux-2.5.61/net/ipv6/Makefile
--- linux-2.5.61.orig/net/ipv6/Makefile 2003-02-14 15:52:25.000000000 -0800
+++ linux-2.5.61/net/ipv6/Makefile 2003-02-15 16:10:13.000000000 -0800
@@ -11,5 +11,3 @@
ip6_flowlabel.o ipv6_syms.o
obj-$(CONFIG_NETFILTER) += netfilter/
-
-obj-y += xfrm_policy.o
diff -ruN linux-2.5.61.orig/net/ipv6/ipv6_syms.c linux-2.5.61/net/ipv6/ipv6_syms.c
--- linux-2.5.61.orig/net/ipv6/ipv6_syms.c 2003-02-14 15:52:09.000000000 -0800
+++ linux-2.5.61/net/ipv6/ipv6_syms.c 2003-02-15 16:10:24.000000000 -0800
@@ -26,6 +26,3 @@
EXPORT_SYMBOL(inet6_ioctl);
EXPORT_SYMBOL(ipv6_get_saddr);
EXPORT_SYMBOL(ipv6_chk_addr);
-EXPORT_SYMBOL(xfrm6_register_type);
-EXPORT_SYMBOL(xfrm6_unregister_type);
-EXPORT_SYMBOL(xfrm6_get_type);
diff -ruN linux-2.5.61.orig/net/ipv6/xfrm_policy.c linux-2.5.61/net/ipv6/xfrm_policy.c
--- linux-2.5.61.orig/net/ipv6/xfrm_policy.c 2003-02-14 15:52:25.000000000 -0800
+++ linux-2.5.61/net/ipv6/xfrm_policy.c 1969-12-31 16:00:00.000000000 -0800
@@ -1,43 +0,0 @@
-#include <net/xfrm.h>
-#include <net/ip.h>
-
-static struct xfrm_type *xfrm6_type_map[256];
-static rwlock_t xfrm6_type_lock = RW_LOCK_UNLOCKED;
-
-int xfrm6_register_type(struct xfrm_type *type)
-{
- int err = 0;
-
- write_lock(&xfrm6_type_lock);
- if (xfrm6_type_map[type->proto] == NULL)
- xfrm6_type_map[type->proto] = type;
- else
- err = -EEXIST;
- write_unlock(&xfrm6_type_lock);
- return err;
-}
-
-int xfrm6_unregister_type(struct xfrm_type *type)
-{
- int err = 0;
-
- write_lock(&xfrm6_type_lock);
- if (xfrm6_type_map[type->proto] != type)
- err = -ENOENT;
- else
- xfrm6_type_map[type->proto] = NULL;
- write_unlock(&xfrm6_type_lock);
- return err;
-}
-
-struct xfrm_type *xfrm6_get_type(u8 proto)
-{
- struct xfrm_type *type;
-
- read_lock(&xfrm6_type_lock);
- type = xfrm6_type_map[proto];
- if (type && !try_module_get(type->owner))
- type = NULL;
- read_unlock(&xfrm6_type_lock);
- return type;
-}
diff -ruN linux-2.5.61.orig/net/netsyms.c linux-2.5.61/net/netsyms.c
--- linux-2.5.61.orig/net/netsyms.c 2003-02-14 15:51:31.000000000 -0800
+++ linux-2.5.61/net/netsyms.c 2003-02-15 16:10:46.000000000 -0800
@@ -328,6 +328,9 @@
EXPORT_SYMBOL(xfrm6_state_lookup);
EXPORT_SYMBOL(xfrm6_find_acq);
EXPORT_SYMBOL(xfrm6_alloc_spi);
+EXPORT_SYMBOL(xfrm6_register_type);
+EXPORT_SYMBOL(xfrm6_unregister_type);
+EXPORT_SYMBOL(xfrm6_get_type);
#endif
EXPORT_SYMBOL_GPL(xfrm_probe_algs);
next prev parent reply other threads:[~2003-02-16 1:49 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2003-02-15 1:11 Linux v2.5.61 Linus Torvalds
2003-02-15 9:07 ` 2.5.61: tms380tr.c no longer compiles Adrian Bunk
2003-02-15 9:35 ` Jochen Friedrich
2003-02-15 13:53 ` Adrian Bunk
2003-02-15 13:53 ` Linux v2.5.61 Matthias Andree
2003-02-16 1:58 ` Kunihiro Ishiguro [this message]
2003-02-16 10:03 ` David Woodhouse
2003-02-17 11:20 ` Erik Hensema
2003-02-15 18:35 ` Christoph Hellwig
2003-02-15 18:45 ` Jeff Garzik
2003-02-15 18:49 ` Christoph Hellwig
2003-02-16 21:32 ` Pavel Machek
2003-02-17 23:56 ` Jeff Garzik
2003-02-17 19:35 ` John Cherry
2003-02-18 0:52 ` Linux v2.5.62 John Cherry
2003-02-18 12:14 ` Linux v2.5.61 Oleg Drokin
2003-02-19 0:43 ` Bob Miller
[not found] <Pine.LNX.4.44.0302141709410.1376-100000@penguin.transmeta. com>
2003-02-15 2:17 ` Max Krasnyansky
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87ptptx9z1.wl@ipinfusion.com \
--to=kunihiro@ipinfusion.com \
--cc=linux-kernel@vger.kernel.org \
--cc=matthias.andree@gmx.de \
--cc=rct@gherkin.frus.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox