Skip to contentSkip to conversation

iptables userspace build patch (CLASSIFY & NETMAP extensions)

PATCH Henrik Nordstrom 3 participants 7 messages Sep 9, 2003 – Sep 16, 2003

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

Both CLASSIFY and NETMAP are optional extensions and should not be built unless supported by the kernel headers.

This patch removes both from the default set of extensions and adds a new test for CLASSIFY.

* removes the double dependency warning on NETMAP and allows the
already defined test for NETMAP to function correcly to allow iptables to build even if the kernel is not patched with base/NETMAP

* allows iptables userspace to be built even if the kernel is not
patched with extras/CLASSIFY

Regards
Henrik

Index: extensions/.CLASSIFY-test
===================================================================
RCS file: extensions/.CLASSIFY-test

.CLASSIFY-test new file +2 -0
diff -N extensions/.CLASSIFY-test
@@ -0,0 +1,2 @@
+#! /bin/sh
+[ -f $KERNEL_DIR/linux/netfilter_ipv4/ipt_CLASSIFY.h ] && echo CLASSIFY

Index: extensions/Makefile
===================================================================
RCS file: /cvspublic/netfilter/userspace/extensions/Makefile,v retrieving revision 1.33

Makefile +1 -1
diff -u -w -p -r1.33 Makefile
@@ -5,7 +5,7 @@
 # header files are present in the include/linux directory of this iptables
 # package (HW)
 #
-PF_EXT_SLIB:=ah connlimit conntrack dscp ecn esp helper icmp iprange length limit mac mark multiport owner physdev pkttype realm rpc standard state tcp tcpmss tos ttl udp unclean CLASSIFY CONNMARK DNAT DSCP ECN LOG MARK MASQUERADE MIRROR NETMAP REDIRECT REJECT SAME SNAT TARPIT TCPMSS TOS TTL ULOG
+PF_EXT_SLIB:=ah connlimit conntrack dscp ecn esp helper icmp iprange length limit mac mark multiport owner physdev pkttype realm rpc standard state tcp tcpmss tos ttl udp unclean CONNMARK DNAT DSCP ECN LOG MARK MASQUERADE MIRROR REDIRECT REJECT SAME SNAT TARPIT TCPMSS TOS TTL ULOG
 PF6_EXT_SLIB:=eui64 hl icmpv6 length limit mac mark multiport owner standard tcp udp HL LOG MARK
 
 # Optionals
#1 lore raw
Quoted 3 lines · Henrik Nordstrom

Both CLASSIFY and NETMAP are optional extensions and should not be built unless supported by the kernel headers.

Well, that is not true.

We currently have three kinds of possible extensions:

1) included in mainstream kernel
This means we always build the plugin

2) included only in patch-o-matic
This means we execute a test

3) extension is about to be submitted to the kernel
This means we have the kernel header files included in the iptables userspace code to make sure it always compiles. Include paths are ordered in a way that kernel headers precede our provided headers.

Both of the targets fall in category three. This means that if the kernel headers are missing, they need to be committed to the CVS repository (which I seem to have forgotten).

Quoted 2 lines

Regards
Henrik

Signature · 5 lines
- Harald Welte <[email protected]>             http://www.netfilter.org/
============================================================================
  "Fragmentation is like classful addressing -- an interesting early
   architectural error that shows how much experimentation was going
   on while IP was being designed."                    -- Paul Vixie
#2 lore raw
Quoted 3 lines · Harald Welte

Both of the targets fall in category three. This means that if the kernel headers are missing, they need to be committed to the CVS repository (which I seem to have forgotten).

Ok.

In such case the test for NETMAP should be deleted from the CVS.

Regards
Henrik

#3 lore raw
Quoted 1 line · Henrik Nordstrom

In such case the test for NETMAP should be deleted from the CVS.

which is what I did. Thanks anyway for making me aware of the problem.

Quoted 2 lines

Regards
Henrik

Signature · 5 lines
- Harald Welte <[email protected]>             http://www.netfilter.org/
============================================================================
  "Fragmentation is like classful addressing -- an interesting early
   architectural error that shows how much experimentation was going
   on while IP was being designed."                    -- Paul Vixie
#4 lore raw

mån 2003-09-15 klockan 11.55 skrev Harald Welte:

Quoted 5 lines · Henrik Nordstrom
Quoted 2 lines

In such case the test for NETMAP should be deleted from the CVS.

which is what I did. Thanks anyway for making me aware of the problem.

It is still there in the current pserver CVS tree which is what I see..

CVSROOT :pserver:[email protected]:/cvspublic
Path: netfilter/userspace/extensions/.NETMAP-test

Regards
Henrik

Signature · 2 lines
Henrik Nordstrom <[email protected]>
MARA Systems AB
#5 lore raw
Quoted 11 lines · Henrik Nordstrom

mån 2003-09-15 klockan 11.55 skrev Harald Welte:

Quoted 5 lines · Henrik Nordstrom
Quoted 2 lines

In such case the test for NETMAP should be deleted from the CVS.

which is what I did. Thanks anyway for making me aware of the problem.

It is still there in the current pserver CVS tree which is what I see..

CVSROOT :pserver:[email protected]:/cvspublic
Path: netfilter/userspace/extensions/.NETMAP-test

The sync between the private and the public cvs trees is currently broken, I mentioned it to Harald in a mail but I'm not sure he saw it. Harald?

/Martin

#6 lore raw
Quoted 3 lines · Martin Josefsson

The sync between the private and the public cvs trees is currently broken, I mentioned it to Harald in a mail but I'm not sure he saw it. Harald?

I'm still in Sofia/Bulgaria. I only have internet connectivity every two days (and only _very_ slow with about 1.5sec minimum latency)... thus don't expect too fast responses from me.

Quoted 1 line

/Martin

Signature · 5 lines
- Harald Welte <[email protected]>             http://www.netfilter.org/
============================================================================
  "Fragmentation is like classful addressing -- an interesting early
   architectural error that shows how much experimentation was going
   on while IP was being designed."                    -- Paul Vixie