summaryrefslogtreecommitdiffstats
path: root/bpf.c
diff options
context:
space:
mode:
authorRoy Marples <roy@marples.name>2008-07-23 17:06:42 +0000
committerRoy Marples <roy@marples.name>2008-07-23 17:06:42 +0000
commitb8b4be9a39e91342c91e493ce2e08c00d0177aa8 (patch)
treeee2ad95243ab6b0c06485c227cd72ef96762936f /bpf.c
parent482f13c723f9353308e869d006771c717e440cd9 (diff)
downloaddhcpcd-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.c10
1 files changed, 2 insertions, 8 deletions
diff --git a/bpf.c b/bpf.c
index f661fe9b..96e53a16 100644
--- a/bpf.c
+++ b/bpf.c
@@ -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 (;;) {