Opened 3 years ago

#20211 new defect

dhcp + static IP: bad routing table when using metric

Reported by: skcris Owned by: developers
Priority: normal Milestone: Chaos Calmer 15.05
Component: base system Version: Trunk
Keywords: Cc:


When using this configuration

config interface 'wan'
	option ifname 'eth1'
	option proto 'dhcp'
	option metric 3

config interface 'lan'
	option ifname 'eth1'
	option proto 'static'
	option ipaddr ''
	option netmask ''

I get this route entry dev eth1 proto static scope link metric 3

If I remove the "metric" option, it's dev eth1 proto kernel scope link src

Since the static IP happens to be the first IP for the eth1 interface, it results in this when using the "metric" option
# ip route get dev eth1 src

Instead of this, which is the correct one
# ip route get dev eth1 src

Given that an interface can have multiple addresses, the routing entry created when using the metric option should also contain the src address.

I'm using commit a9be6c0348ce622a3d3806804b1c372fdb11db25, from the Chaos Calmer branch.

Attachments (0)

Change History (0)

Add Comment

Modify Ticket

as new .

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

Note: See TracTickets for help on using tickets.