diff options
| author | Roy Marples <roy@marples.name> | 2009-03-10 17:28:18 +0000 |
|---|---|---|
| committer | Roy Marples <roy@marples.name> | 2009-03-10 17:28:18 +0000 |
| commit | ce6b39df64069a367cf62fd2bf450613ea54fc1a (patch) | |
| tree | 6086bad95b20cbd34f8ddbf5e603a4465f259912 /if-options.c | |
| parent | d14bdb3d441eae153235f877045d5ea8b098cebb (diff) | |
| download | dhcpcd-ce6b39df64069a367cf62fd2bf450613ea54fc1a.tar.xz | |
We need to blacklist IP addresses at the packet level
so we can ignore NAKs from rogue servers who don't
supply a ServerID, or supply a fake one.
Diffstat (limited to 'if-options.c')
| -rw-r--r-- | if-options.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/if-options.c b/if-options.c index 7e79633a..c49031df 100644 --- a/if-options.c +++ b/if-options.c @@ -634,9 +634,10 @@ parse_option(struct if_options *ifo, int opt, const char *arg) } break; case 'X': - addr2.s_addr = ~0U; if (parse_addr(&addr, &addr2, arg) != 0) return -1; + if (strchr(arg, '/') == NULL) + addr2.s_addr = INADDR_BROADCAST; ifo->blacklist = xrealloc(ifo->blacklist, sizeof(in_addr_t) * (ifo->blacklist_len + 2)); ifo->blacklist[ifo->blacklist_len++] = addr.s_addr; |
