From: Felix Fietkau Date: Wed, 15 Feb 2012 17:30:25 +0000 (+0100) Subject: initialize route->metric to -1 X-Git-Url: https://git.archive.openwrt.org/?a=commitdiff_plain;h=fb8c31126f5837d8d014f31083e97f32aa5063b2;p=project%2Fnetifd.git initialize route->metric to -1 --- 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);