2.2.0-pre4-ac1: ipmasq related compile problem

Rene Hojbjerg Larsen (renehl@post1.tele.dk)
Mon, 4 Jan 1999 03:32:21 +0100 (CET)


Trying to compile kernel 2.2.0-pre4-ac1 with ipmasq support results in
an unresolved reference during final linking of the kernel:

ld -m elf_i386 -T /usr/local/src/kernel-source-2.2.0-pre4-ac1/arch/i386/vmlinux.lds -e stext arch/i386/kernel/head.o arch/i386/kernel/init_task.o init/main.o init/version.o \
--start-group \
arch/i386/kernel/kernel.o arch/i386/mm/mm.o kernel/kernel.o mm/mm.o fs/fs.o ipc/ipc.o \
fs/filesystems.a \
net/network.a \
drivers/block/block.a drivers/char/char.a drivers/misc/misc.a drivers/net/net.a drivers/cdrom/cdrom.a drivers/pci/pci.a drivers/pnp/pnp.a drivers/video/video.a \
/usr/local/src/kernel-source-2.2.0-pre4-ac1/arch/i386/lib/lib.a /usr/local/src/kernel-source-2.2.0-pre4-ac1/lib/lib.a /usr/local/src/kernel-source-2.2.0-pre4-ac1/arch/i386/lib/lib.a \
--end-group \
-o vmlinux
net/network.a(ipv4.o)(__ksymtab+0x68): undefined reference to `ip_masq_select_addr'
make[1]: *** [vmlinux] Error 1
make[1]: Leaving directory `/usr/local/src/kernel-source-2.2.0-pre4-ac1'

This problem seems to have been introduced by Alan's CONFIG_PROC_FS
cleanups. This patch should fix it:

--- kernel-source-2.2.0-pre4-ac1/net/ipv4/ip_masq_user.c.orig Mon Jan 4 02:50:53 1999
+++ kernel-source-2.2.0-pre4-ac1/net/ipv4/ip_masq_user.c Mon Jan 4 02:52:02 1999
@@ -100,7 +100,7 @@
return ret;
}
dev = rt->u.dst.dev;
- ums->maddr = ip_masq_select_addr(dev, rt->rt_gateway, RT_SCOPE_UNIVERSE);
+ ums->maddr = inet_select_addr(dev, rt->rt_gateway, RT_SCOPE_UNIVERSE);

IP_MASQ_DEBUG(1-debug, "did setup maddr=%lX\n", ntohl(ums->maddr));
ip_rt_put(rt);
--- kernel-source-2.2.0-pre4-ac1/net/ipv4/ip_masq.c.orig Mon Jan 4 03:00:37 1999
+++ kernel-source-2.2.0-pre4-ac1/net/ipv4/ip_masq.c Mon Jan 4 03:00:55 1999
@@ -368,7 +368,6 @@
EXPORT_SYMBOL(ip_masq_user_hook);
EXPORT_SYMBOL(ip_masq_m_tab);
EXPORT_SYMBOL(ip_masq_state_name);
-EXPORT_SYMBOL(ip_masq_select_addr);
EXPORT_SYMBOL(__ip_masq_lock);

/*

I don't know this code very well (at all) so my fix may be wrong, but It
Works For Me (TM). YMMV.

-- 
       /'"`\  zzzZ  | My PGP Public Key is available at:
      ( - - )       | <http://home1.inet.tele.dk/renehl/>
--oooO--(_)--Oooo------------------------------------------ 
 Don't ya just hate it when there's not enough room to fin 

- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.rutgers.edu Please read the FAQ at http://www.tux.org/lkml/