Bug 153524 - kernel gentoo-sources-2.6.18-r1 fails to compile xt_physdev.c
Bug#: 153524 Product:  Gentoo Linux Version: unspecified Platform: All
OS/Version: Linux Status: RESOLVED Severity: minor Priority: P2
Resolution: FIXED Assigned To: dsd@gentoo.org Reported By: rumi@rtfm.hu
Component: Core system
URL:  http://www2.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commitdiff_plain;h=f1da70632fa0875f80fc60991a010c31f40983ff;hp=78b656b8bf933101b42409b4492734b23427bfc3
Summary: kernel gentoo-sources-2.6.18-r1 fails to compile xt_physdev.c
Keywords:  
Status Whiteboard: 
Opened: 2006-10-31 01:18 0000
Description:   Opened: 2006-10-31 01:18 0000
Overview:

Kernel 2.6.18-gentoo-r1 fails to compile module xt_physdev.c

Actual results:

[...]

  GEN     .version
  CHK     include/linux/compile.h
  UPD     include/linux/compile.h
  CC      init/version.o
  LD      init/built-in.o
  LD      .tmp_vmlinux1
net/built-in.o: In function `checkentry':
xt_physdev.c:(.text+0x1fba5): undefined reference to `brnf_deferred_hooks'
xt_physdev.c:(.text+0x1fbcf): undefined reference to `brnf_deferred_hooks'
make: *** [.tmp_vmlinux1] Error 1

Additional info:

xt_physdev.c is apparently the implementation of
CONFIG_NETFILTER_XT_MATCH_PHYSDEV ("physdev" match support)
which was enabled in the kernel config.

xt_physdev.c includes <linux/netfilter_bridge.h> and in
netfilter_bridge.h the declaration
"extern int brnf_deferred_hooks;" is a conditional of
CONFIG_BRIDGE_NETFILTER (Bridged IP/ARP packets filtering)
but this was also enabled in the kernel config.

Disabling CONFIG_NETFILTER_XT_MATCH_PHYSDEV makes the
kernel compile.

------- Comment #1 From Daniel Drake 2006-10-31 08:01:13 0000 -------
Please attach your .config

------- Comment #2 From Rumi Szabolcs 2006-10-31 08:40:45 0000 -------
Created an attachment (id=100896) [details]
kernel .config file

------- Comment #3 From bugzilla@schoenhaber.de 2006-11-11 06:31:56 0000 -------
I experience the same problem as Rumi reported, with the same workaround
(disabeling "physdev" match support), but using gentoo-sources-2.6.18-r2 which
has been declared stable yesterday.

------- Comment #4 From bugzilla@schoenhaber.de 2006-11-11 06:33:25 0000 -------
Created an attachment (id=101679) [details]
kernel .config for 2.6.18-gentoo-r2

------- Comment #5 From Michael Hoegler 2006-11-13 08:40:11 0000 -------
Confirm the same problem with gentoo-sources-2.6.18-r2.
Im trying to recompile with 
CONFIG_NETFILTER_XT_MATCH_PHYSDEV=m
Results will follow!

------- Comment #6 From Daniel Drake 2006-11-14 11:27:14 0000 -------
You need to enable CONFIG_BRIDGE_NETFILTER. This will be fixed in the next
release.

------- Comment #7 From Daniel Drake 2006-11-20 08:55:47 0000 -------
Fixed in gentoo-sources-2.6.18-r3 (genpatches-2.6.18-4)