]> git.ipfire.org Git - thirdparty/dhcpcd.git/commitdiff
BSD: avoid RTF_WASCLONED routes
authorRoy Marples <roy@marples.name>
Mon, 9 Sep 2019 20:18:36 +0000 (21:18 +0100)
committerRoy Marples <roy@marples.name>
Mon, 9 Sep 2019 20:18:36 +0000 (21:18 +0100)
src/if-bsd.c

index 8348d42dcfae67b6794360fe90f8bf0f778d5b83..89013b1120f52055cad7f98a5b6d04b1222f2b0f 100644 (file)
@@ -653,6 +653,12 @@ if_copyrt(struct dhcpcd_ctx *ctx, struct rt *rt, const struct rt_msghdr *rtm)
                return -1;
        }
 #endif
+#ifdef RTF_WASCLONED
+       if (rtm->rtm_flags & RTF_WASCLONED) {
+               errno = ENOTSUP;
+               return -1;
+       }
+#endif
 #ifdef RTF_LOCAL
        if (rtm->rtm_flags & RTF_LOCAL) {
                errno = ENOTSUP;