Package: ifupdown
Version: 0.7.8
Severity: important
Tags: ipv6

Adding an entry to the routing table immediately after an inet6 interface is
brought up will result in an error. However waiting for 5 seconds after
the interface has been brought up and then changing the routing table
succeeds.

More specifically, when running the following command:

/sbin/ip -6 route add $GW src $IP dev eth0 table 1

where $GW is the gateway IP and $IP is the IP associated with eth0. IP will
exit with code 2 and print the following:

RTNETLINK answers: Invalid argument

and the routing table is not modified.

This only occurs immediately after the interface is brought up, as if
it is in an inconsistent state for a brief period.

Steps to reproduce:
1. Create an init script, e.g. /etc/init.d/routetest with the following
content:

--- BEGIN ---
#!/bin/sh -e

### BEGIN INIT INFO
# Provides:          routetest
# Required-Start:    $network $local_fs
# Required-Stop:     $network $local_fs
# Default-Start:     S
# Default-Stop:      0 6
### END INIT INFO

. /lib/lsb/init-functions

GW=
IP=
/sbin/ip -6 route add $GW src $IP dev eth0 table 1
--- END ---

2. Fill in appropriate GW and IP
3. Run 'update-rc.d routetest defaults' to add to init sequence
4. Reboot

Expected result:
The system boots without errors and has an updated routing table.

Actual result:
An error is printed:

RTNETLINK answers: Invalid argument

and the routing table is unchanged.

Workaround:
Add 'sleep 5' before invocing 'ip'

Impact:
System is not or only partially reachable over the network because routing
table is either missing or incomplete. When used in combination with other
packages (e.g. shorewall6) this may lead to an insecure situation in which
the inet6 interface is up, with default routing, but without firewall.

I haven't observed this behaviour with IPv4.

Please let me know if you need any more information to reproduce this.

Laurens

-- System Information:
Debian Release: 7.8
  APT prefers stable
  APT policy: (500, 'stable')
Architecture: amd64 (x86_64)

Kernel: Linux 3.2.0-4-amd64 (SMP w/1 CPU core)
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash

Versions of packages ifupdown depends on:
ii  dpkg         1.16.15
ii  initscripts  2.88dsf-41+deb7u1
ii  iproute      20120521-3+b3
ii  libc6        2.13-38+deb7u7
ii  lsb-base     4.1+Debian8+deb7u1

ifupdown recommends no packages.

Versions of packages ifupdown suggests:
ii  isc-dhcp-client [dhcp-client]  4.2.2.dfsg.1-5+deb70u6
ii  net-tools                      1.60-24.2
pn  ppp                            <none>
pn  rdnssd                         <none>

-- no debconf information


-- 
To UNSUBSCRIBE, email to [email protected]
with a subject of "unsubscribe". Trouble? Contact [email protected]

Reply via email to