From: Roy Marples Date: Thu, 23 May 2013 09:48:28 +0000 (+0000) Subject: Warn about the difference between CSR and MS CSR. X-Git-Tag: v5.99.7~40 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=ea476d00b60cdb9bd02a6ae6e3ac6118162f456e;p=thirdparty%2Fdhcpcd.git Warn about the difference between CSR and MS CSR. Fixed #254. --- diff --git a/dhcp.c b/dhcp.c index a33d61ff..373f439c 100644 --- 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;