Hi, i'm trying to build an kernel rpm with applying a netfilter patch (time extension). Firstly I simply add a Patch entry into the spec file and then build and install it, then recompile the iptables package; but the iptables' ipt_time.o file (in /lib/modules/`uname -r`/kernel/net/ipv4/netfilter) isn't created. I get "No target/match/chain by that name" error when i try to use time match. When i look at the Makefile in linux-2.4.20/net/ipv4/netfilter directory i see that all of the iptables match module files ipt_*.o has an entry but there is no ipt_time.o entry. Then i added the line
Code:
obj-$(CONFIG_IP_NF_MATCH_TIME) += ipt_time.o
to the Makefile and used the script below in the spec file just before %build file to add required lines to autoconf.h and .config files (I shortcut the rpm build to make it start from build step for not to lost changes i made)
Code:
echo -e "\aadding CONFIG_IP_NF_MATCH_TIME to .config files.."
sleep 5
# mbaris -- 270704 -- netfilter time patch configuration
# add constant to .config file
for file in configs/*.config; do
if echo $file | grep -v BOOT > /dev/null; then
cat >> $file << EOF
CONFIG_IP_NF_MATCH_TIME=m
EOF
else
cat >> $file << EOF
# CONFIG_IP_NF_MATCH_TIME is not set
EOF
fi
done
echo -e "\aadding CONFIG_IP_NF_MATCH_TIME to autoconf.h file.."
sleep 5
# mbaris -- 030804 -- netfilter time patch configuration
# add constant to autoconf.h
cat >> ./include/linux/autoconf.h << EOF
#define CONFIG_IP_NF_MATCH_TIME_MODULE 1
EOF
(The reason i added these into these files is that: When i do a `make menuconfig' and check the files that have changed in 5 or less minutes in kernel source; find command gives me the autoconf.h file.)
There is still no ipt_time.o file and corresponding match in iptables. Should i change the Config.in files also? What i am doing wrong? Thanks.