]> git.ipfire.org Git - thirdparty/dhcpcd.git/commitdiff
Fix IP sharing on Linux
authorRoy Marples <roy@marples.name>
Thu, 9 Oct 2014 19:32:30 +0000 (19:32 +0000)
committerRoy Marples <roy@marples.name>
Thu, 9 Oct 2014 19:32:30 +0000 (19:32 +0000)
ipv4.c

diff --git a/ipv4.c b/ipv4.c
index 8dd67de85cf8a13c2900e27da389d715459f281a..b9bcde018dd8227adc4f74ae612a00e3be675f81 100644 (file)
--- a/ipv4.c
+++ b/ipv4.c
@@ -584,7 +584,7 @@ ipv4_buildroutes(struct dhcpcd_ctx *ctx)
        TAILQ_INIT(nrs);
        TAILQ_FOREACH(ifp, ctx->ifaces, next) {
                state = D_CSTATE(ifp);
-               if (state == NULL || state->new == NULL)
+               if (state == NULL || state->new == NULL || !state->added)
                        continue;
                dnr = get_routes(ifp);
                dnr = massage_host_routes(dnr, ifp);
@@ -764,6 +764,7 @@ ipv4_applyaddr(void *arg)
                                        {
                                                ipv4_addaddr(ifn,
                                                    &nstate->lease);
+                                               nstate->added = 1;
                                                break;
                                        }
                                }