/* RFC 3442 states that the CSR has to come before all other
* routes. For completeness, we also specify static routes,
* then routers. */
- { 121, RFC3442 | REQUEST, "classless_static_routes" },
+ { 121, RFC3442, "classless_static_routes" },
{ 249, RFC3442, "ms_classless_static_routes" },
{ 33, IPV4 | ARRAY | REQUEST, "static_routes" },
{ 3, IPV4 | ARRAY | REQUEST, "routers" },
* If we have a CSR then we only use that.
* Otherwise we add static routes and then routers. */
struct rt *
-get_option_routes(const struct dhcp_message *dhcp)
+get_option_routes(const char *ifname, const struct dhcp_message *dhcp)
{
const uint8_t *p;
const uint8_t *e;
p = get_option(dhcp, DHO_MSCSR, &len, NULL);
if (p) {
routes = decode_rfc3442_rt(len, p);
- if (routes)
+ if (routes) {
+ syslog(LOG_DEBUG, "%s: using Classless Static Routes (RFC3442)",
+ ifname);
return routes;
+ }
}
/* OK, get our static routes first. */
#define is_bootp(m) (m && \
!IN_LINKLOCAL(htonl((m)->yiaddr)) && \
get_option_uint8(NULL, m, DHO_MESSAGETYPE) == -1)
-struct rt *get_option_routes(const struct dhcp_message *);
+struct rt *get_option_routes(const char *, const struct dhcp_message *);
ssize_t configure_env(char **, const char *, const struct dhcp_message *,
const struct if_options *);
# A list of options to request from the DHCP server.
option domain_name_servers, domain_name, domain_search, host_name
+option classless_static_routes
# Most distributions have NTP support.
option ntp_servers
# Respect the network MTU.