}
*p++ = DHCP_NETMASK;
*p++ = DHCP_BROADCAST;
- *p++ = DHCP_CSR;
- /* RFC 3442 states classless static routes should be before routers
- * and static routes as classless static routes override them both */
+
+ /* -S means request CSR and MSCSR
+ * -SS means only request MSCSR incase DHCP message
+ * is too big */
+ if (options->domscsr < 2)
+ *p++ = DHCP_CSR;
+ if (options->domscsr > 0)
+ *p++ = DHCP_MSCSR;
+ /* RFC 3442 states classless static routes should be
+ * before routers and static routes as classless static
+ * routes override them both */
*p++ = DHCP_STATICROUTE;
*p++ = DHCP_ROUTERS;
*p++ = DHCP_HOSTNAME;
route_t *static_routes = NULL;
route_t *static_routesp = NULL;
route_t *csr = NULL;
+ route_t *mscsr = NULL;
bool in_overload = false;
bool parse_sname = false;
bool parse_file = false;
csr = decode_CSR (p, length);
break;
+ case DHCP_MSCSR:
+ MIN_LENGTH (5);
+ free_route (mscsr);
+ mscsr = decode_CSR (p, length);
+ break;
+
#ifdef ENABLE_INFO
case DHCP_SIPSERVER:
free (dhcp->sipservers);
static routes and routers according to RFC 3442 */
if (csr) {
dhcp->routes = csr;
+ free_route (mscsr);
+ free_route (routers);
+ free_route (static_routes);
+ } else if (mscsr) {
+ dhcp->routes = mscsr;
free_route (routers);
free_route (static_routes);
} else {
{"nogateway", no_argument, NULL, 'G'},
{"sethostname", no_argument, NULL, 'H'},
{"clientid", optional_argument, NULL, 'I'},
- {"noipv4ll", no_argument, NULL, 'L'},
+ {"noipv4ll", no_argument, NULL, 'L'},
{"nomtu", no_argument, NULL, 'M'},
{"nontp", no_argument, NULL, 'N'},
{"nodns", no_argument, NULL, 'R'},
+ {"msscr", no_argument, NULL, 'S'},
{"test", no_argument, NULL, 'T'},
{"nonis", no_argument, NULL, 'Y'},
{"help", no_argument, &dohelp, 1},
{"version", no_argument, &doversion, 1},
#ifdef THERE_IS_NO_FORK
- {"daemonised", no_argument, NULL, 'f'},
- {"skiproutes", required_argument, NULL, 'g'},
+ {"daemonised", no_argument, NULL, 'f'},
+ {"skiproutes", required_argument, NULL, 'g'},
#endif
{NULL, 0, NULL, 0}
};
static void usage (void)
{
- printf ("usage: "PACKAGE" [-adknpEGHMNRTY] [-c script] [-h hostname] [-i classID]\n"
+ printf ("usage: "PACKAGE" [-adknpEGHMNRSTY] [-c script] [-h hostname] [-i classID]\n"
" [-l leasetime] [-m metric] [-r ipaddress] [-s ipaddress]\n"
" [-t timeout] [-u userclass] [-F none | ptr | both]\n"
" [-I clientID] <interface>\n");
case 'R':
options->dodns = false;
break;
+ case 'S':
+ options->domscsr++;
+ break;
case 'T':
#ifndef ENABLE_INFO
logger (LOG_ERR, "info support not compiled into dhcpcd");