Bug 7179 - Compilation of .tmp_linux1 fails due to missing declaration in net/netfilter/xt_physdev.c
Summary: Compilation of .tmp_linux1 fails due to missing declaration in net/netfilter/...
Status: REJECTED DUPLICATE of bug 7171
Alias: None
Product: Networking
Classification: Unclassified
Component: Netfilter/Iptables (show other bugs)
Hardware: i386 Linux
: P2 high
Assignee: Harald Welte
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2006-09-21 14:31 UTC by Graham Frank
Modified: 2006-10-05 05:30 UTC (History)
1 user (show)

See Also:
Kernel Version: 2.6.18
Subsystem:
Regression: ---
Bisected commit-id:


Attachments

Description Graham Frank 2006-09-21 14:31:25 UTC
Most recent kernel where this bug did not occur: 2.6.17.13
Distribution: CentOS
Hardware Environment: Dual Intel Xeon 5160
Software Environment: gcc 3.4.6, glibc 2.3.4, make 3.8
Problem Description:

Using the same config from 2.6.17.13, kernel 2.6.18 fails on make when 
attempting to make .tmp_vmlinux1

LD      .tmp_vmlinux1
net/built-in.o(.text.checkentry+0x1e1): In function `checkentry':
net/netfilter/xt_physdev.c:130: undefined reference to `brnf_deferred_hooks'
make: *** [.tmp_vmlinux1] Error 1

Line 130 is simply "brnf_deferred_hooks = 1;"  This variable is also used on 
line 118.

Adding 

"int brnf_deferred_hooks = 0;" 

in a line before line 104 (static int) will cause .tmp_vmlinux1 to be 
successfully created, and make will finish successfully.  However, it will 
generate a warning (seen below) on now line 119 which can be fixed by changing 
it to: 

"if ((brnf_deferred_hooks == 0) & (info->bitmask & XT_PHYSDEV_OP_OUT) && "

The warning generated is:

net/netfilter/xt_physdev.c: In function `checkentry':
net/netfilter/xt_physdev.c:118: warning: ISO C90 forbids mixed declarations 
and code

The kernel produced after making these changes works fine

Steps to reproduce:

I am unsure of which kernel .config parameter is sparking this.  My .config 
can be found here: http://www.animeforum.com/jakiao/misato.config
Comment 1 Graham Frank 2006-09-21 14:57:58 UTC
I just attempted to replicate this bug on another server of mine.

On a dual AMD Opteron 270 system, the bug was successfully replicated.

LD      .tmp_vmlinux1
net/built-in.o(.text.checkentry+0x1c0): In function `checkentry':
net/netfilter/xt_physdev.c:117: undefined reference to `brnf_deferred_hooks'
net/built-in.o(.text.checkentry+0x1ea):net/netfilter/xt_physdev.c:130: 
undefined reference to `brnf_deferred_hooks'
make: *** [.tmp_vmlinux1] Error 1
Comment 2 Andrew James Wade 2006-09-25 20:50:07 UTC
The problematic combination is 
"physdev" match support (NETFILTER_XT_MATCH_PHYSDEV)
without
802.1d Ethernet Bridging (BRIDGE)

The commit that introduced int brnf_deferred_hooks is:
http://www.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=10ea6ac895418bd0d23900e3330daa6ba0836d26

I have taken the liberty of emailing Patrick McHardy a link back here.
Comment 3 Adrian Bunk 2006-10-05 05:30:30 UTC

*** This bug has been marked as a duplicate of 7171 ***

Note You need to log in before you can comment on or make changes to this bug.