Skip to contentSkip to conversation

developing netfilter patch

DISCUSSION [email protected] 2 participants 2 messages Jan 25, 2003 netfilter

lore
Share & tools
lore
#0 lore raw

I have created a patch to netfilter but my problem is:

when I run patch-o-matic utility to patch netfilter, it works well and creates ipt_name.o in /usr/src/linux/net/ipv4/netfilter/.

My great trouble is that my patch has a libipt_name.c in /usr/src/netfilter/userspace/extensions/.

I don't known add it to the makefile to create libipt_name.so (shared object) in /lib/iptables/.

Could anybody help me,please?

Thanks.

___________________________________________________
Yahoo! Móviles
Personaliza tu móvil con tu logo y melodía favorito en http://moviles.yahoo.es

#1 lore raw

Hi Macada

Quoted 5 lines · You

My great trouble is that my patch has a libipt_name.c in /usr/src/netfilter/userspace/extensions/.

I don't known add it to the makefile to create libipt_name.so (shared object) in /lib/iptables/.

You probably forgot to create a test userspace/extensions/.name-test for your extension (as described in patch-o-matic/NEWPATCHES).

The reason that this test is needed becomes obvious when you look
at userspace/extensions/Makefile. In line 12 it says:
PF_EXT_SLIB_OPTS:=$(foreach T,$(wildcard extensions/.*-test),$(shell KERNEL_DIR=$(KERNEL_DIR) $(T)))

Now, if there is no userspace/extensions/.name-test your extensions is not part of PF_EXT_SLIB_OPTS which means that no libipt_name.so will be built. Moreover if userspace/extensions/.name-test does not output name (as above 'name' stands for the name of your extension) which should be the case if the corresponding kernel patch was not applied your extension will also not become part of PF_EXT_SLIB_OPTS.

Just take a look at existing userspace/extensions/.*-test files.

Hope that helps.

Thomas