Modify

Opened 10 years ago

Closed 10 years ago

#2621 closed defect (fixed)

config.sh - ifup default route add with dev

Reported by: mathias@… Owned by: developers
Priority: normal Milestone:
Component: base system Version:
Keywords: Cc:

Description

In some environments there are different interfaces with same or overlapping ip networks. If you would like to setup a default route via one dedicated device or iface in /etc/config/network it doesn't apply for the choosen iface.

Please add this really small patch to /etc/config.sh

--- config.sh   2007-05-07 23:39:47.000000000 +0000
+++ config.sh.new       2007-10-28 16:12:35.000000000 +0000
@@ -153,7 +153,7 @@
 
                        [ -z "$ipaddr" ] || $DEBUG ifconfig "$iface" "$ipaddr" netmask "$netmask"
                        [ -z "$ip6addr" ] || $DEBUG ifconfig "$iface" add "$ip6addr"
-                       [ -z "$gateway" ] || $DEBUG route add default gw "$gateway"
+                       [ -z "$gateway" ] || $DEBUG route add default gw "$gateway" dev "$iface"
                        [ -z "$bcast" ] || $DEBUG ifconfig "$iface" broadcast "$bcast"
                        [ -z "$dns" -o -f /tmp/resolv.conf.auto ] || {
                                for ns in $dns; do

This should break anything, but 'll add the default route at the defined device as expected.

Attachments (0)

Change History (2)

comment:1 Changed 10 years ago by mathias

Oops. This _shouldn't_ break anything...

comment:2 Changed 10 years ago by nbd

  • Resolution set to fixed
  • Status changed from new to closed

added in r12027

Add Comment

Modify Ticket

Action
as closed .
The resolution will be deleted. Next status will be 'reopened'.
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.