From c397d2788ffd27904ab89e437432b481c6e7e806 Mon Sep 17 00:00:00 2001 From: Hans Dedecker Date: Tue, 19 Nov 2013 12:17:04 +0100 Subject: [PATCH] netifd: Don't export default route via UBUS when disabled Signed-off-by: Hans Dedecker --- ubus.c | 3 +++ 1 file changed, 3 insertions(+) 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 -- 2.30.2