diff options
author | Felix Fietkau <nbd@openwrt.org> | 2012-02-15 18:30:25 +0100 |
---|---|---|
committer | Felix Fietkau <nbd@openwrt.org> | 2012-02-15 18:30:25 +0100 |
commit | fb8c31126f5837d8d014f31083e97f32aa5063b2 (patch) | |
tree | 507079c94337530ccf5b66ba89759a9256cf0683 | |
parent | c0bb8addecae578d7766b94bd6681be82b621675 (diff) |
initialize route->metric to -1
-rw-r--r-- | interface-ip.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/interface-ip.c b/interface-ip.c index 9bdad4f..2088937 100644 --- a/interface-ip.c +++ b/interface-ip.c @@ -94,6 +94,8 @@ interface_ip_add_route(struct interface *iface, struct blob_attr *attr, bool v6) if ((cur = tb[ROUTE_METRIC]) != NULL) route->metric = blobmsg_get_u32(cur); + else + route->metric = -1; if ((cur = tb[ROUTE_MTU]) != NULL) route->mtu = blobmsg_get_u32(cur); |