diff options
| author | Roy Marples <roy@marples.name> | 2008-08-18 12:43:05 +0000 |
|---|---|---|
| committer | Roy Marples <roy@marples.name> | 2008-08-18 12:43:05 +0000 |
| commit | cc45fbd76ed54efda7538a2eb8e56dd714346467 (patch) | |
| tree | 1e01216167ac00bee224572d4218a45f273b3cd1 /dhcp.c | |
| parent | bac03ede3de43969143a5bd314af10f17003980a (diff) | |
| download | dhcpcd-cc45fbd76ed54efda7538a2eb8e56dd714346467.tar.xz | |
The require directive now requires that the required options are present in each DHCP message. A few variables and functions have also been renamed to make this part more readable.
Diffstat (limited to 'dhcp.c')
| -rw-r--r-- | dhcp.c | 16 |
1 files changed, 8 insertions, 8 deletions
@@ -166,7 +166,7 @@ print_options(void) printf("%03d %s\n", opt->option, opt->var); } -int make_reqmask(uint8_t *mask, char **opts, int add) +int make_option_mask(uint8_t *mask, char **opts, int add) { char *token, *p = *opts, *t; const struct dhcp_opt *opt; @@ -190,11 +190,11 @@ int make_reqmask(uint8_t *mask, char **opts, int add) } if (match) { if (add == 1) - add_reqmask(mask, - opt->option); + add_option_mask(mask, + opt->option); else - del_reqmask(mask, - opt->option); + del_option_mask(mask, + opt->option); break; } } @@ -908,7 +908,7 @@ make_message(struct dhcp_message **message, *p++ = 0; for (opt = dhcp_opts; opt->option; opt++) { if (!(opt->type & REQUEST || - has_reqmask(options->reqmask, opt->option))) + has_option_mask(options->requestmask, opt->option))) continue; switch (opt->option) { case DHO_RENEWALTIME: /* FALLTHROUGH */ @@ -1176,7 +1176,7 @@ configure_env(char **env, const char *prefix, const struct dhcp_message *dhcp, for (opt = dhcp_opts; opt->option; opt++) { if (!opt->var) continue; - if (has_reqmask(options->nomask, opt->option)) + if (has_option_mask(options->nomask, opt->option)) continue; if (get_option_raw(dhcp, opt->option)) e++; @@ -1219,7 +1219,7 @@ configure_env(char **env, const char *prefix, const struct dhcp_message *dhcp, for (opt = dhcp_opts; opt->option; opt++) { if (!opt->var) continue; - if (has_reqmask(options->nomask, opt->option)) + if (has_option_mask(options->nomask, opt->option)) continue; val = NULL; p = get_option(dhcp, opt->option, &pl, NULL); |
