diff options
| author | Roy Marples <roy@marples.name> | 2008-07-23 17:06:42 +0000 |
|---|---|---|
| committer | Roy Marples <roy@marples.name> | 2008-07-23 17:06:42 +0000 |
| commit | b8b4be9a39e91342c91e493ce2e08c00d0177aa8 (patch) | |
| tree | ee2ad95243ab6b0c06485c227cd72ef96762936f /bpf.c | |
| parent | 482f13c723f9353308e869d006771c717e440cd9 (diff) | |
| download | dhcpcd-b8b4be9a39e91342c91e493ce2e08c00d0177aa8.tar.xz | |
Remove #ifdefs to disable specific bits of code. We now build everything - we're small enough :)
Diffstat (limited to 'bpf.c')
| -rw-r--r-- | bpf.c | 10 |
1 files changed, 2 insertions, 8 deletions
@@ -108,11 +108,9 @@ open_socket(struct interface *iface, int protocol) /* Install the DHCP filter */ if (protocol == ETHERTYPE_ARP) { -#ifdef ENABLE_ARP pf.bf_insns = UNCONST(arp_bpf_filter); pf.bf_len = arp_bpf_filter_len; fdp = &iface->arp_fd; -#endif } else { pf.bf_insns = UNCONST(dhcp_bpf_filter); pf.bf_len = dhcp_bpf_filter_len; @@ -151,11 +149,9 @@ send_raw_packet(const struct interface *iface, int protocol, iov[0].iov_len = ETHER_HDR_LEN; iov[1].iov_base = UNCONST(data); iov[1].iov_len = len; -#ifdef ENABLE_ARP if (protocol == ETHERTYPE_ARP) fd = iface->arp_fd; else -#endif fd = iface->raw_fd; return writev(fd, iov, 2); } @@ -171,11 +167,9 @@ get_raw_packet(struct interface *iface, int protocol, ssize_t bytes; const unsigned char *payload; - if (protocol == ETHERTYPE_ARP) { -#ifdef ENABLE_ARP + if (protocol == ETHERTYPE_ARP) fd = iface->arp_fd; -#endif - } else + else fd = iface->raw_fd; for (;;) { |
