interface-ip: fix subnet route handling
authorFelix Fietkau <nbd@openwrt.org>
Tue, 15 Dec 2015 10:57:48 +0000 (11:57 +0100)
committerFelix Fietkau <nbd@openwrt.org>
Tue, 15 Dec 2015 10:57:52 +0000 (11:57 +0100)
commitd5f53f4d79231f59494da852b73d2d9d2b9c43cc
treee6faf6554096249b7658634259ce971c82a67be2
parente911dd3a798a543d40b93fe8dcb0824bd011c621
interface-ip: fix subnet route handling

When the kernel subnet route has to be replaced, the cleanup call needs
to match the properties of the replacement route exactly, mainly the
metric and the routing table.
Fix handling this by embedding the device_route for the subnet in the
device_addr struct and using it in the cleanup path.

This fixes issues on config reload with changes to the routing table

Signed-off-by: Felix Fietkau <nbd@openwrt.org>
interface-ip.c
interface-ip.h