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 /arp.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 'arp.c')
| -rw-r--r-- | arp.c | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -40,7 +40,7 @@ #include "ipv4ll.h" #include "net.h" -#define ARP_LEN \ +#define ARP_LEN \ (sizeof(struct arphdr) + (2 * sizeof(uint32_t)) + (2 * HWADDR_LEN)) static int @@ -140,7 +140,7 @@ handle_arp_packet(void *arg) memcpy(&reply_t, hw_t + ar.ar_hln, ar.ar_pln); /* Check for conflict */ - if (state->offer && + if (state->offer && (reply_s == state->offer->yiaddr || (reply_s == 0 && reply_t == state->offer->yiaddr))) state->fail.s_addr = state->offer->yiaddr; |
