comparison src/if-options.c @ 5574:2a519da0f1a2 draft

DHCP: Split hardware address randomisation out of anonymous option A 3rd party might want to control the randomisation.
author Roy Marples <roy@marples.name>
date Mon, 28 Dec 2020 00:02:26 +0000
parents 0c4608a6cc2a
children
comparison
equal deleted inserted replaced
5573:5bf8e1fc0634 5574:2a519da0f1a2
118 {"denyinterfaces", required_argument, NULL, 'Z'}, 118 {"denyinterfaces", required_argument, NULL, 'Z'},
119 {"oneshot", no_argument, NULL, '1'}, 119 {"oneshot", no_argument, NULL, '1'},
120 {"ipv4only", no_argument, NULL, '4'}, 120 {"ipv4only", no_argument, NULL, '4'},
121 {"ipv6only", no_argument, NULL, '6'}, 121 {"ipv6only", no_argument, NULL, '6'},
122 {"anonymous", no_argument, NULL, O_ANONYMOUS}, 122 {"anonymous", no_argument, NULL, O_ANONYMOUS},
123 {"randomise_hwaddr",no_argument, NULL, O_RANDOMISE_HWADDR},
123 {"arping", required_argument, NULL, O_ARPING}, 124 {"arping", required_argument, NULL, O_ARPING},
124 {"destination", required_argument, NULL, O_DESTINATION}, 125 {"destination", required_argument, NULL, O_DESTINATION},
125 {"fallback", required_argument, NULL, O_FALLBACK}, 126 {"fallback", required_argument, NULL, O_FALLBACK},
126 {"ipv6rs", no_argument, NULL, O_IPV6RS}, 127 {"ipv6rs", no_argument, NULL, O_IPV6RS},
127 {"noipv6rs", no_argument, NULL, O_NOIPV6RS}, 128 {"noipv6rs", no_argument, NULL, O_NOIPV6RS},
1302 del_option_mask(ifo->nomask6, D6_OPTION_SOL_MAX_RT); 1303 del_option_mask(ifo->nomask6, D6_OPTION_SOL_MAX_RT);
1303 del_option_mask(ifo->nomask6, D6_OPTION_INF_MAX_RT); 1304 del_option_mask(ifo->nomask6, D6_OPTION_INF_MAX_RT);
1304 #endif 1305 #endif
1305 1306
1306 break; 1307 break;
1308 case O_RANDOMISE_HWADDR:
1309 ifo->randomise_hwaddr = true;
1310 break;
1307 #ifdef INET 1311 #ifdef INET
1308 case O_ARPING: 1312 case O_ARPING:
1309 while (arg != NULL) { 1313 while (arg != NULL) {
1310 fp = strwhite(arg); 1314 fp = strwhite(arg);
1311 if (fp) 1315 if (fp)