Don't accidentally apply settings from foreign interfaces
authorSteven Barth <steven@midlink.org>
Tue, 22 Oct 2013 10:49:54 +0000 (12:49 +0200)
committerSteven Barth <steven@midlink.org>
Tue, 22 Oct 2013 10:49:54 +0000 (12:49 +0200)
src/ubus.c

index 1c74499..dc2f171 100644 (file)
@@ -246,7 +246,7 @@ void ubus_apply_network(void)
                        bool cmatched = !strcmp(interface, c->name) || !strcmp(ifname, c->ifname);
                        matched |= cmatched;
 
-                       if (!cmatched && (!f || (f != c->upstream && f[-1] != 0)))
+                       if (!cmatched && (!c->upstream_len || !f || (f != c->upstream && f[-1] != 0)))
                                continue;
 
                        if (!c->ignore)