2001-04-27 00:53:38

by Matthias Andree

[permalink] [raw]
Subject: 2.4.4-pre7 build failure w/ IP NAT and ipchains

net/network.o: In function `ip_nat_setup_info':
net/network.o(.text+0x37b3e): undefined reference to `helpers'
net/network.o(.text+0x37b54): undefined reference to `helpers'

.config bzip2'ed:

begin 644 .config.bz2
M0EIH.3%!629362!2/`L``EC?@$`0$`)_XC____"((L@@8`;<+Z'5[WNZN[I;
M9NYNVL,\6=>&IDTU,0TTTGHC31I#1#]1,@:9("8301-34:-`#(Q!*)Z34IYH
MGI30!H``&C02:D0$Q32;1J:`T&@`#`&FAHT8C(!H`-#!)""-#4P*GI/4:```
M+_Z'[9FD#:Q0L1.5J+1!16##AHO1"A!%1-*`IC`1C54P01",,&D8&54899VD
MN,45BR)%4%54!11%@L-TQVYG/^7URHQFI<OVX89;<]?(OCZ]\O@%>F]G5H])
M^NH[#)XR8D;@3'#](H/>P9^8MX+^&FX;9>!C:#8KS."N?2F8Q*:R/#1XC.4Q
MF0N#2X\6//#T%9?B19RK,P&;;!Z.\R`R"2U?$&U!KA]+S#4,1-KN,R)NO$,C
MBD5FFP()!42/RZSQ_<D\*;QOOG5U,<<!6K;5+ARMXA==HX>R?/:3NBQ.(;YO
MS*R?KU$)NR)UO.EPMU7KH6?8E&-`\^?>UT83FCCM/V;E-9G$2($K*==^(SYG
M"]W[MM-;)1WL(..0?:&G.1Q\IVGOOAG[(0OLQ(^[CM\8,I=2"/ZEFTUD9;'8
M];])/QIRP4W5!%65U^N\ZA_%8O`I`T<-,%M+9PQ81"'2'CU\5BG3;%4-Z#70
MC8P[\5=,NPJH3.$U'UN4;(KAR;MD!V/BDAIQ0>,=8<F,2=9WSQ#CU=Q7%931
MRK=Z#.UZ$Z3\B"!$NAA%:E50DQEFY^A)))F'1:[68,M#A],-KC2S4\>?6+BT
MIF,]I#N:&K#>-ID)ILADQ%`Q'=[3E/,[7<&('9I7N*'A(@;"P<-F-GO+)83+
ME43+=-\+]?NK3^'O</,N'=-MHYU(C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#GG<R?/V6MV\\N4-HJ,\JO:I/#KO:3N34>3=U:<2UJH=:[>8LJEV(K
MVL"MJ<W=JS8!IC9`[email protected])=F4/+I(`E"B@DU_29J<5?T?B".!5&2MOA<E5@
MBVB1B2$,V3"M&^[VM1.P@AF,2;]<XGXB(F6)7L<\TH)00N68".A`>MK2$-\N
=S;JJ8;KI>F!O/D!F.']P0#,'^+N2*<*$@0*1X%@`
`
end

--
Matthias Andree


2001-04-27 08:02:58

by David Miller

[permalink] [raw]
Subject: Re: 2.4.4-pre7 build failure w/ IP NAT and ipchains


Your configuration seems impossible, somehow the config system allowed
you to set CONFIG_IP_NF_COMPAT_IPCHAINS without setting
CONFIG_IP_NF_CONNTRACK.

Later,
David S. Miller
[email protected]

2001-04-27 09:56:07

by Matthias Andree

[permalink] [raw]
Subject: Re: 2.4.4-pre7 build failure w/ IP NAT and ipchains

On Fri, 27 Apr 2001, David S. Miller wrote:

> Your configuration seems impossible, somehow the config system allowed
> you to set CONFIG_IP_NF_COMPAT_IPCHAINS without setting
> CONFIG_IP_NF_CONNTRACK.

Wow.

Now, if I set "connection tracking" to "y", the ipchains option
disappears (make menuconfig). Are things supposed to behave this way?
I'd like to stick to ipchains for a while, rather than switch to
iptables. (Administrator laziness, of course.)

2001-04-27 17:43:12

by Andrzej Krzysztofowicz

[permalink] [raw]
Subject: Re: 2.4.4-pre7 build failure w/ IP NAT and ipchains

"Matthias Andree wrote:"
> On Fri, 27 Apr 2001, David S. Miller wrote:
> > Your configuration seems impossible, somehow the config system allowed
> > you to set CONFIG_IP_NF_COMPAT_IPCHAINS without setting
> > CONFIG_IP_NF_CONNTRACK.

Just quick look at net/ipv4/netfilter/Config.in explains everything:

: if [ "$CONFIG_IP_NF_CONNTRACK" != "y" ]; then
: if [ "$CONFIG_IP_NF_IPTABLES" != "y" ]; then
: tristate 'ipchains (2.2-style) support' CONFIG_IP_NF_COMPAT_IPCHAINS

CONFIG_IP_NF_COMPAT_IPCHAINS depends on CONFIG_IP_NF_CONNTRACK being
disabled. And it seems to be intentional...

> Now, if I set "connection tracking" to "y", the ipchains option
> disappears (make menuconfig). Are things supposed to behave this way?
> I'd like to stick to ipchains for a while, rather than switch to
> iptables. (Administrator laziness, of course.)

--
=======================================================================
Andrzej M. Krzysztofowicz [email protected]
phone (48)(58) 347 14 61
Faculty of Applied Phys. & Math., Technical University of Gdansk

2001-04-27 18:14:51

by Kai Germaschewski

[permalink] [raw]
Subject: Re: 2.4.4-pre7 build failure w/ IP NAT and ipchains


On Fri, 27 Apr 2001, David S. Miller wrote:

>> net/network.o: In function `ip_nat_setup_info':
>> net/network.o(.text+0x37b3e): undefined reference to `helpers'
>> net/network.o(.text+0x37b54): undefined reference to `helpers'
>
> Your configuration seems impossible, somehow the config system allowed
> you to set CONFIG_IP_NF_COMPAT_IPCHAINS without setting
> CONFIG_IP_NF_CONNTRACK.

Hmmh, actually the Config.in won't allow you to to set
CONFIG_IP_NF_COMPAT_IPCHAINS if CONFIG_IP_NF_CONNTRACK=y, but I don't
really understand that Config.in completely. (CONFIG_IP_NF_NAT_NEEDED is
set, but AFAICS never referenced anywhere).

Anyway, the appended patch fixed the problem for me, vmlinux links okay
now - didn't try if it works, though.

--Kai


Index: net/ipv4/netfilter/ip_conntrack_core.c
===================================================================
RCS file: /scratch/kai/cvsroot/linux_2_4/net/ipv4/netfilter/ip_conntrack_core.c,v
retrieving revision 1.1.1.3
diff -u -r1.1.1.3 ip_conntrack_core.c
--- net/ipv4/netfilter/ip_conntrack_core.c 2001/04/24 00:20:29 1.1.1.3
+++ net/ipv4/netfilter/ip_conntrack_core.c 2001/04/26 20:49:36
@@ -46,7 +46,7 @@
void (*ip_conntrack_destroyed)(struct ip_conntrack *conntrack) = NULL;
LIST_HEAD(expect_list);
LIST_HEAD(protocol_list);
-static LIST_HEAD(helpers);
+LIST_HEAD(helpers);
unsigned int ip_conntrack_htable_size = 0;
static int ip_conntrack_max = 0;
static atomic_t ip_conntrack_count = ATOMIC_INIT(0);




2001-04-27 21:31:38

by David Miller

[permalink] [raw]
Subject: Re: 2.4.4-pre7 build failure w/ IP NAT and ipchains


Kai Germaschewski writes:
> Anyway, the appended patch fixed the problem for me, vmlinux links okay
> now - didn't try if it works, though.

This may work, but it is evidently the wrong change.

The helpers list desired by net/ipv4/netfilter/ip_nat_*.c is
in net/ipv4/netfilter/ip_nat_helper.c and it is not static there.

My analysis on your config being illegal, as pointed out by others, is
wrong technically. But, something else is awry since
net/ipv4/netfilter/ip_nat_core.o should not be built without
net/ipv4/netfilter/ip_nat_helper.o being built as well.

I'll hopefully solve this by the end of the day.

Later,
David S. Miller
[email protected]

2001-04-27 22:54:47

by David Miller

[permalink] [raw]
Subject: Re: 2.4.4-pre7 build failure w/ IP NAT and ipchains


Kai, can you try this patch out? I think it does the right
thing. What I'm mostly interested in is if your ipchains
setup works for the resulting kernel, I've already checked
that it links properly. :-)

--- net/ipv4/netfilter/Makefile.~1~ Thu Apr 26 23:30:39 2001
+++ net/ipv4/netfilter/Makefile Fri Apr 27 15:49:54 2001
@@ -16,11 +16,11 @@

# objects for the conntrack and NAT core (used by standalone and backw. compat)
ip_nf_conntrack-objs := ip_conntrack_core.o ip_conntrack_proto_generic.o ip_conntrack_proto_tcp.o ip_conntrack_proto_udp.o ip_conntrack_proto_icmp.o
-ip_nf_nat-objs := ip_nat_core.o ip_nat_proto_unknown.o ip_nat_proto_tcp.o ip_nat_proto_udp.o ip_nat_proto_icmp.o
+ip_nf_nat-objs := ip_nat_core.o ip_nat_helper.o ip_nat_proto_unknown.o ip_nat_proto_tcp.o ip_nat_proto_udp.o ip_nat_proto_icmp.o

# objects for the standalone - connection tracking / NAT
ip_conntrack-objs := ip_conntrack_standalone.o $(ip_nf_conntrack-objs)
-iptable_nat-objs := ip_nat_standalone.o ip_nat_rule.o ip_nat_helper.o $(ip_nf_nat-objs)
+iptable_nat-objs := ip_nat_standalone.o ip_nat_rule.o $(ip_nf_nat-objs)

# objects for backwards compatibility mode
ip_nf_compat-objs := ip_fw_compat.o ip_fw_compat_redir.o ip_fw_compat_masq.o $(ip_nf_conntrack-objs) $(ip_nf_nat-objs)

2001-04-27 23:44:32

by David Miller

[permalink] [raw]
Subject: Re: 2.4.4-pre7 build failure w/ IP NAT and ipchains


Kai Germaschewski writes:
> If you get this mail, it works okay :-) (Just using a simple
> masquerading setup here)

Cool, I've sent this fix off to Rusty and Linus already.

Later,
David S. Miller
[email protected]

2001-04-27 23:43:31

by Kai Germaschewski

[permalink] [raw]
Subject: Re: 2.4.4-pre7 build failure w/ IP NAT and ipchains

On Fri, 27 Apr 2001, David S. Miller wrote:

> Kai, can you try this patch out? I think it does the right
> thing. What I'm mostly interested in is if your ipchains
> setup works for the resulting kernel, I've already checked
> that it links properly. :-)

If you get this mail, it works okay :-) (Just using a simple
masquerading setup here)

--Kai


2001-04-28 19:53:31

by Matthias Andree

[permalink] [raw]
Subject: Re: 2.4.4-pre7 build failure w/ IP NAT and ipchains

On Fri, 27 Apr 2001, David S. Miller wrote:

> Kai, can you try this patch out? I think it does the right
> thing. What I'm mostly interested in is if your ipchains
> setup works for the resulting kernel, I've already checked
> that it links properly. :-)

I'm not Kai, but I also reported similar problems, and tried your patch,
and I can confirm it working.