]> git.ipfire.org Git - thirdparty/dhcpcd.git/commitdiff
route: Don't install an IPv4LL default route if static one exists
authorRoy Marples <roy@marples.name>
Wed, 17 Apr 2019 01:14:00 +0000 (01:14 +0000)
committerRoy Marples <roy@marples.name>
Wed, 17 Apr 2019 01:14:00 +0000 (01:14 +0000)
src/ipv4.c

index 7a39c2c5d0ddd5e8899df6ed98a5cd44b1cbb92b..df106e80532b1e9665f869e4f468368a3ae46053 100644 (file)
@@ -450,6 +450,8 @@ inet_getroutes(struct dhcpcd_ctx *ctx, struct rt_head *routes)
        memset(&def, 0, sizeof(def));
        def.rt_dest.sa_family = AF_INET;
        have_default = (rt_find(routes, &def) != NULL);
+       if (!have_default)
+               have_default = (rt_find(&ctx->kroutes, &def) != NULL);
        if (!have_default) {
                TAILQ_FOREACH(ifp, ctx->ifaces, next) {
                        if (ifp->active &&