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 1c74499dc404cf1454a694a457adfa8ffde5585b..dc2f17135524b9e593e9fe233edf59d2a4b2eeb2 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)