From: Hans Dedecker Date: Tue, 19 Nov 2013 11:17:04 +0000 (+0100) Subject: netifd: Don't export default route via UBUS when disabled X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=c397d2788ffd27904ab89e437432b481c6e7e806;p=oweals%2Fnetifd.git netifd: Don't export default route via UBUS when disabled Signed-off-by: Hans Dedecker --- diff --git a/ubus.c b/ubus.c index 794444e..9bd5d8c 100644 --- a/ubus.c +++ b/ubus.c @@ -463,6 +463,9 @@ interface_ip_dump_route_list(struct interface_ip_settings *ip, bool enabled) if (route->enabled != enabled) continue; + if ((ip->no_defaultroute == enabled) && !route->mask) + continue; + if ((route->flags & DEVADDR_FAMILY) == DEVADDR_INET4) af = AF_INET; else