LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software > Linux - Kernel
User Name
Password
Linux - Kernel This forum is for all discussion relating to the Linux kernel.

Notices


Reply
  Search this Thread
Old 09-05-2007, 02:11 PM   #1
skubik
Member
 
Registered: May 2003
Location: A dark corner in Canada
Distribution: Slackware64 15.0/current
Posts: 152

Rep: Reputation: 21
Problems compiling netfilter modules from 2.6.21.5 kernel


I'm attempting to compile the netfilter modules for the 2.6.21.5 kernel so that I can utilize iptables on my system. It currently runs 2.6.21.5 just fine.

I went into 'make menuconfig' and selected just about everything under the netfilter menus to be compiled as modules (probably overkill), but when I go to compile the modules, using 'make modules', I get this output:

Code:
  CHK     include/linux/version.h
  CHK     include/linux/utsrelease.h
  Building modules, stage 2.
  MODPOST 252 modules
WARNING: "textsearch_destroy" [net/netfilter/xt_string.ko] undefined!
WARNING: "textsearch_prepare" [net/netfilter/xt_string.ko] undefined!
WARNING: "nf_proto_csum_replace4" [net/netfilter/xt_TCPMSS.ko] undefined!
WARNING: "skb_make_writable" [net/netfilter/xt_TCPMSS.ko] undefined!
WARNING: "nf_log_packet" [net/netfilter/xt_NFLOG.ko] undefined!
WARNING: "ip_ct_attach" [net/netfilter/nf_conntrack.ko] undefined!
WARNING: "nf_log_packet" [net/netfilter/nf_conntrack.ko] undefined!
WARNING: "nf_register_sysctl_table" [net/netfilter/nf_conntrack.ko] undefined!
WARNING: "nf_unregister_sysctl_table" [net/netfilter/nf_conntrack.ko] undefined!
WARNING: "nf_net_netfilter_sysctl_path" [net/netfilter/nf_conntrack.ko] undefined!
WARNING: "nf_net_ipv4_netfilter_sysctl_path" [net/netfilter/nf_conntrack.ko] undefined!
WARNING: "nf_afinfo" [net/netfilter/nf_conntrack.ko] undefined!
WARNING: "nf_hook_slow" [net/ipv6/sit.ko] undefined!
WARNING: "nf_hooks" [net/ipv6/sit.ko] undefined!
WARNING: "nf_getsockopt" [net/ipv6/ipv6.ko] undefined!
WARNING: "nf_ct_attach" [net/ipv6/ipv6.ko] undefined!
WARNING: "nf_hooks" [net/ipv6/ipv6.ko] undefined!
WARNING: "nf_hook_slow" [net/ipv6/ipv6.ko] undefined!
WARNING: "nf_register_afinfo" [net/ipv6/ipv6.ko] undefined!
WARNING: "nf_setsockopt" [net/ipv6/ipv6.ko] undefined!
WARNING: "nf_unregister_afinfo" [net/ipv6/ipv6.ko] undefined!
WARNING: "nf_hook_slow" [net/ipv6/ip6_tunnel.ko] undefined!
WARNING: "nf_hooks" [net/ipv6/ip6_tunnel.ko] undefined!
WARNING: "nf_ip_checksum" [net/ipv4/netfilter/nf_nat.ko] undefined!
WARNING: "nf_proto_csum_replace4" [net/ipv4/netfilter/nf_nat.ko] undefined!
WARNING: "skb_make_writable" [net/ipv4/netfilter/nf_nat.ko] undefined!
WARNING: "nf_ip_checksum" [net/ipv4/netfilter/nf_conntrack_ipv4.ko] undefined!
WARNING: "nf_log_packet" [net/ipv4/netfilter/nf_conntrack_ipv4.ko] undefined!
WARNING: "nf_unregister_hooks" [net/ipv4/netfilter/nf_conntrack_ipv4.ko] undefined!
WARNING: "nf_unregister_sockopt" [net/ipv4/netfilter/nf_conntrack_ipv4.ko] undefined!
WARNING: "nf_net_ipv4_netfilter_sysctl_path" [net/ipv4/netfilter/nf_conntrack_ipv4.ko] undefined!
WARNING: "nf_register_hooks" [net/ipv4/netfilter/nf_conntrack_ipv4.ko] undefined!
WARNING: "nf_register_sockopt" [net/ipv4/netfilter/nf_conntrack_ipv4.ko] undefined!
WARNING: "ip_xfrm_me_harder" [net/ipv4/netfilter/iptable_nat.ko] undefined!
WARNING: "ip_nat_decode_session" [net/ipv4/netfilter/iptable_nat.ko] undefined!
WARNING: "ip_route_me_harder" [net/ipv4/netfilter/iptable_nat.ko] undefined!
WARNING: "nf_unregister_hooks" [net/ipv4/netfilter/iptable_nat.ko] undefined!
WARNING: "nf_register_hooks" [net/ipv4/netfilter/iptable_nat.ko] undefined!
WARNING: "nf_unregister_hooks" [net/ipv4/netfilter/iptable_filter.ko] undefined!
WARNING: "nf_register_hooks" [net/ipv4/netfilter/iptable_filter.ko] undefined!
WARNING: "nf_log_unregister" [net/ipv4/netfilter/ipt_ULOG.ko] undefined!
WARNING: "nf_log_register" [net/ipv4/netfilter/ipt_ULOG.ko] undefined!
WARNING: "nf_hook_slow" [net/ipv4/netfilter/ipt_REJECT.ko] undefined!
WARNING: "nf_hooks" [net/ipv4/netfilter/ipt_REJECT.ko] undefined!
WARNING: "nf_ct_attach" [net/ipv4/netfilter/ipt_REJECT.ko] undefined!
WARNING: "ip_route_me_harder" [net/ipv4/netfilter/ipt_REJECT.ko] undefined!
WARNING: "nf_ip_checksum" [net/ipv4/netfilter/ipt_REJECT.ko] undefined!
WARNING: "nf_log_unregister" [net/ipv4/netfilter/ipt_LOG.ko] undefined!
WARNING: "nf_log_register" [net/ipv4/netfilter/ipt_LOG.ko] undefined!
WARNING: "nf_unregister_sockopt" [net/ipv4/netfilter/ip_tables.ko] undefined!
WARNING: "nf_register_sockopt" [net/ipv4/netfilter/ip_tables.ko] undefined!
WARNING: "nf_unregister_hooks" [net/ipv4/netfilter/arptable_filter.ko] undefined!
WARNING: "nf_register_hooks" [net/ipv4/netfilter/arptable_filter.ko] undefined!
WARNING: "nf_unregister_sockopt" [net/ipv4/netfilter/arp_tables.ko] undefined!
WARNING: "nf_register_sockopt" [net/ipv4/netfilter/arp_tables.ko] undefined!
WARNING: "nf_hook_slow" [net/ipv4/ipip.ko] undefined!
WARNING: "nf_hooks" [net/ipv4/ipip.ko] undefined!
WARNING: "textsearch_unregister" [lib/ts_kmp.ko] undefined!
WARNING: "textsearch_register" [lib/ts_kmp.ko] undefined!
WARNING: "textsearch_unregister" [lib/ts_fsm.ko] undefined!
WARNING: "textsearch_register" [lib/ts_fsm.ko] undefined!
WARNING: "textsearch_unregister" [lib/ts_bm.ko] undefined!
WARNING: "textsearch_register" [lib/ts_bm.ko] undefined!
make[1]: *** [__modpost] Error 1
make: *** [modules] Error 2
Any ideas what is causing this or where I should begin to look?

Thanks,

- skubik.
 
Old 09-05-2007, 02:24 PM   #2
Okie
Senior Member
 
Registered: Mar 2002
Location: Oklahoma
Posts: 1,154

Rep: Reputation: 187Reputation: 187
when building a 2.6.xx kernel such as the one you want to build you don't use make modules...

make menuconf (set your preferences)

make

make modules_install


no make modules are needed anymore as they are part of make which takes care of all of the following commands - make dep, make clean, make bzIamge and make modules
 
Old 09-05-2007, 04:11 PM   #3
skubik
Member
 
Registered: May 2003
Location: A dark corner in Canada
Distribution: Slackware64 15.0/current
Posts: 152

Original Poster
Rep: Reputation: 21
I tried your suggestion- and for the most-part it seemed to work. That is, there were no compile-time errors and the modules actually seem to be in the kernel module repository under /lib/modules/2.6.21.5/...

However, when I go to insert the module, I get this:

> modprobe ip_tables
FATAL: Error inserting ip_tables (/lib/modules/2.6.21.5/kernel/net/ipv4/netfilter/ip_tables.ko): Unknown symbol in module, or unknown parameter (see dmesg)

So I look at dmesg, and find:
ip_tables: Unknown symbol nf_register_sockopt
ip_tables: Unknown symbol nf_unregister_sockopt

Something still isn't right here. Any ideas?

Thanks,

- skubik.
 
Old 09-05-2007, 04:18 PM   #4
Okie
Senior Member
 
Registered: Mar 2002
Location: Oklahoma
Posts: 1,154

Rep: Reputation: 187Reputation: 187
you probably need to copy over System.map & .config and /usr/src/linux/arch/i386/boot/bzImage to /boot then update /etc/lilo.conf & run /sbin/lilo to reflect the new kernel...

in other words i suggest if you are going to rebuild kernel modules it will only work if you install the whole kernel...
 
Old 09-05-2007, 04:33 PM   #5
skubik
Member
 
Registered: May 2003
Location: A dark corner in Canada
Distribution: Slackware64 15.0/current
Posts: 152

Original Poster
Rep: Reputation: 21
Makes sense I suppose. I will give it a shot. Thanks for your help- hopefully this will work and I won't continue to pester.
 
Old 09-06-2007, 01:32 PM   #6
skubik
Member
 
Registered: May 2003
Location: A dark corner in Canada
Distribution: Slackware64 15.0/current
Posts: 152

Original Poster
Rep: Reputation: 21
Just a followup post for the thread- I did rebuild the entire kernel and install it, and now iptables works just fine.

I did also download and build the newest iptables toolkit (v.1.3.8) against this kernel, and everything seems to be working just fine.
 
Old 09-06-2007, 03:01 PM   #7
Okie
Senior Member
 
Registered: Mar 2002
Location: Oklahoma
Posts: 1,154

Rep: Reputation: 187Reputation: 187
good to hear you resolved your problem...
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
/lib/modules/2.4.33.3/kernel/sound folder is missing after compiling kernel Paulo Góes Slackware - Installation 2 04-15-2007 08:42 PM
compiling modules in kernel 2.6 DrowningFish Programming 4 03-18-2006 05:03 AM
Compiling too many modules into kernel samac Slackware 13 02-27-2006 06:35 PM
compiling kernel modules axr0284 Programming 2 11-26-2005 03:08 PM
need some help in Compiling Kernel modules bharat83 SUSE / openSUSE 1 01-07-2005 07:21 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software > Linux - Kernel

All times are GMT -5. The time now is 12:27 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration