memset the on-stack device route when clearing local subnet routes
authorFelix Fietkau <nbd@openwrt.org>
Thu, 5 Jul 2012 16:15:09 +0000 (18:15 +0200)
committerFelix Fietkau <nbd@openwrt.org>
Thu, 5 Jul 2012 16:15:14 +0000 (18:15 +0200)
interface-ip.c

index fa84fc76ed0a63f13dabb09f8e53fcb20b9932d2..0610ffde65311378ab0befab1207c69cd07aa7e3 100644 (file)
@@ -270,6 +270,7 @@ interface_handle_subnet_route(struct interface *iface, struct device_addr *addr,
        struct device *dev = iface->l3_dev.dev;
        struct device_route route;
 
+       memset(&route, 0, sizeof(route));
        route.iface = iface;
        route.flags = addr->flags;
        route.mask = addr->mask;