Skip to Content.
Sympa Menu

sm-discuss - [SM-Discuss] bug? iptables, ifupdown

sm-discuss AT lists.ibiblio.org

Subject: Public SourceMage Discussion List

List archive

Chronological Thread  
  • From: Robert Figura <rfigura AT aubergine.zwischengesicht.de>
  • To: sm-discuss AT lists.ibiblio.org
  • Subject: [SM-Discuss] bug? iptables, ifupdown
  • Date: Fri, 5 Dec 2008 14:39:43 +0100


Hey folks,

i've got some potential commits for the test repo around here and would
like to ask for confirmation. Are there people having the same problems
as i do or do my fixes break something for the other ones?


* iptables and glibc 2.9: there already is a fix in PRE_BUILD which
needs to be extended to line 19.

We had a small discussion on irc and it seems that other people were
able to build iptables with glibc 2.9. So i dived into it. Details:

The error message:

> In file included from /usr/include/netinet/ip.h:25,
> from /usr/include/linux/ip.h:19,
> from tos_values.c:4,
> from libxt_TOS.c:15:
> /usr/include/netinet/in.h:56: error: expected identifier before numeric
> constant

These lines 55 and 56 from /usr/include/netinet/in.h (from glibc):

> IPPROTO_DCCP = 33, /* Datagram Congestion Control Protocol. */
> #define IPPROTO_DCCP IPPROTO_DCCP

Collide with these definitions in include/xtables.h from iptables'
source (included by extensions/libxt_TOS.c):

> #ifndef IPPROTO_DCCP
> #define IPPROTO_DCCP 33
> #endif
> #ifndef IPPROTO_UDPLITE
> #define IPPROTO_UDPLITE 136
> #endif

There already is a fix in iptable's PRE_BUILD:

> sed -i "11,13d" include/xtables.h.in

Which i'd suggest to extend from line 13 to line 19:

> sed -i "11,13d" include/xtables.h.in

Question: Does that break something else?


* ifupdown does not work with 'dhcp' interfaces when dhcp is
installed. It then selects dhclient and execs something like this
command:

> dhclient -e -pf /var/run/dhclient.eth0.pid -lf
> /var/lib/dhcp/dhclient.eth0.leases eth0

But dhclient doesn't permit a space between -pf and it's argument. That
could well be dhclient's bug or it may be ifupdown's problem. My fix
would be to remove some space in inet.defn from ifupdown:

> --- inet.defn.bak 2008-12-04 20:49:27.000000000 +0000
> +++ inet.defn 2008-12-04 20:49:58.000000000 +0000
> @@ -77,7 +77,7 @@
> [[ifconfig %iface% hw %hwaddress%]]
> dhclient3 -pf /var/run/dhclient.%iface%.pid -lf
> /var/lib/dhcp3/dhclient.%iface%.leases %iface% \
> if (execable("/sbin/dhclient3"))
> - dhclient -e -pf /var/run/dhclient.%iface%.pid -lf
> /var/lib/dhcp/dhclient.%iface%.leases %iface% \
> + dhclient -e -pf/var/run/dhclient.%iface%.pid -lf
> /var/lib/dhcp/dhclient.%iface%.leases %iface% \
> elsif (execable("/sbin/dhclient"))
> pump -i %iface% [[-h %hostname%]] [[-l %leasehours%]] \
> elsif (execable("/sbin/pump") && mylinuxver() >= mylinux(2,1,100))

Quuestion is again: would that break for someone else?


Thanks and regards
- Robert Figura

--
/* mandlsig.c 0.42 (c) by Robert Figura */
I=1702;float O,o,i;main(l){for(;I--;putchar("oO .,\nt>neo.ckgel-t\
agidif@<ra urig FrtbeRo"[I%74?I>837&874>I?I^833:l%5:5]))for(O=o=l=
0;O*O+o*o<(16^l++);o=2*O*o+I/74/11.-1,O=i)i=O*O-o*o+I%74*.04-2.2;}




Archive powered by MHonArc 2.6.24.

Top of Page