]> git.ipfire.org Git - thirdparty/dhcpcd.git/commitdiff
Warn about the difference between CSR and MS CSR.
authorRoy Marples <roy@marples.name>
Thu, 23 May 2013 09:48:28 +0000 (09:48 +0000)
committerRoy Marples <roy@marples.name>
Thu, 23 May 2013 09:48:28 +0000 (09:48 +0000)
Fixed #254.

dhcp.c

diff --git a/dhcp.c b/dhcp.c
index a33d61ff79c36e974dfbff29c7799dfa4a500d1e..373f439c9cc0c2fd3f85015f0d2f3068981bbf32 100644 (file)
--- a/dhcp.c
+++ b/dhcp.c
@@ -722,6 +722,7 @@ get_option_routes(struct interface *ifp, const struct dhcp_message *dhcp)
        struct rt_head *routes = NULL;
        struct rt *route = NULL;
        int len;
+       const char *csr = "";
 
        /* If we have CSR's then we MUST use these only */
        if (!has_option_mask(ifo->nomask, DHO_CSR))
@@ -729,15 +730,18 @@ get_option_routes(struct interface *ifp, const struct dhcp_message *dhcp)
        else
                p = NULL;
        /* Check for crappy MS option */
-       if (!p && !has_option_mask(ifo->nomask, DHO_MSCSR))
+       if (!p && !has_option_mask(ifo->nomask, DHO_MSCSR)) {
                p = get_option(dhcp, DHO_MSCSR, &len, NULL);
+               if (p)
+                       csr = "MS ";
+       }
        if (p) {
                routes = decode_rfc3442_rt(len, p);
                if (routes) {
                        if (!(ifo->options & DHCPCD_CSR_WARNED)) {
                                syslog(LOG_DEBUG,
-                                   "%s: using Classless Static Routes",
-                                   ifp->name);
+                                   "%s: using %sClassless Static Routes",
+                                   ifp->name, csr);
                                ifo->options |= DHCPCD_CSR_WARNED;
                        }
                        return routes;