Package: ifupdown
Version: 0.7.53.1
The gateway directive in the interfaces file assigns a default gateway to
the wrong interface:
e.g.
With static config:
--------------------------
auto p2p1
iface p2p1 inet static
address 10.41.3.4/24
gateway 10.41.3.254
auto p3p1
iface p3p1 inet static
address 10.41.104.7/24
gateway 10.41.104.254
Gives:
ip addr = 10.41.3.4/24
ip addr = 10.41.104.7/25
route -n
0.0.0.0 10.41.3.254 UG p2p1
<link-local-routes>
[fails at boot / ifup with RTNETLINK: file exists]
Should be:
ip addr = 10.41.3.4/24
ip addr = 10.41.104.7/25
route -n
0.0.0.0 10.41.3.254 UG p2p1
0.0.0.0 10.41.105.254 UG p3p1
<link-local-routes>
With dhcp
---------------
auto p2p1
iface p2p1 inet dhcp
auto p3p1
iface p3p1 inet dhcp
<same result>
The gateway option should, surely, assign the route to the interface for which
it is being specified?
A work around can be had by using a post-up entry, but isn't this incorrect
behaviour with the gateway option? There is no reason why there can't
be two default routes, one per interface