]> git.ipfire.org Git - thirdparty/dhcpcd.git/commitdiff
Linux: Fix compile for systems without route preference
authorRoy Marples <roy@marples.name>
Wed, 10 Jun 2020 06:16:41 +0000 (07:16 +0100)
committerRoy Marples <roy@marples.name>
Wed, 10 Jun 2020 06:16:41 +0000 (07:16 +0100)
src/if-linux.c

index 7c8d7e2bd4a5b4f8f03bc8c5dff5712d617a8bea..18df5f64ebad496bfd7bb15ec019a44945bdad71 100644 (file)
@@ -1513,6 +1513,7 @@ if_route(unsigned char cmd, const struct rt *rt)
                            (unsigned short)RTA_PAYLOAD(metrics));
                }
 
+#ifdef HAVE_ROUTE_PREF
                if (rt->rt_dflags & RTDF_RA) {
                        uint8_t pref;
 
@@ -1532,6 +1533,7 @@ if_route(unsigned char cmd, const struct rt *rt)
                        }
                        add_attr_8(&nlm.hdr, sizeof(nlm), RTA_PREF, pref);
                }
+#endif
        }
 
        if (!sa_is_loopback(&rt->rt_gateway))