diff options
| author | Roy Marples <roy@marples.name> | 2008-06-30 18:54:31 +0000 |
|---|---|---|
| committer | Roy Marples <roy@marples.name> | 2008-06-30 18:54:31 +0000 |
| commit | 5dd248bb688d479b791792024b3abe9a24982e7c (patch) | |
| tree | 1a8b2e2fc1ef19f264cd0e2bcfe11607c526ba86 /lpf.c | |
| parent | d65fd32df0506c849262e1e63611c134db267745 (diff) | |
| download | dhcpcd-5dd248bb688d479b791792024b3abe9a24982e7c.tar.xz | |
Ensure we work if ARP compiled out but requested.
Diffstat (limited to 'lpf.c')
| -rw-r--r-- | lpf.c | 9 |
1 files changed, 4 insertions, 5 deletions
@@ -159,17 +159,16 @@ send_raw_packet(const struct interface *iface, int protocol, } ssize_t -get_raw_packet(struct interface *iface, _unused int protocol, - void *data, ssize_t len) +get_raw_packet(struct interface *iface, int protocol, void *data, ssize_t len) { ssize_t bytes; - int fd; + int fd = -1; + if (protocol == ETHERTYPE_ARP) { #ifdef ENABLE_ARP - if (protocol == ETHERTYPE_ARP) fd = iface->arp_fd; - else #endif + } else fd = iface->fd; bytes = read(fd, data, len); if (bytes == -1) |
