summaryrefslogtreecommitdiff
path: root/common/bpf.c
diff options
context:
space:
mode:
authorShawn Routhier <sar@isc.org>2016-01-19 19:01:39 -0800
committerShawn Routhier <sar@isc.org>2016-01-19 19:01:39 -0800
commitba4c704dbaac0d7ea65025d503acb140cced0e68 (patch)
tree9c487f4dd52a1154bcd685ee5bcbf72833f1224e /common/bpf.c
parentfd1ba3638a0f71812ffe48d5be0ff6e3eb0be1ee (diff)
downloadisc-dhcp-ba4c704dbaac0d7ea65025d503acb140cced0e68.tar.gz
[master] Correct size for buffer allocation
Diffstat (limited to 'common/bpf.c')
-rw-r--r--common/bpf.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/common/bpf.c b/common/bpf.c
index 39d4f45d..0bb140ee 100644
--- a/common/bpf.c
+++ b/common/bpf.c
@@ -3,7 +3,7 @@
BPF socket interface code, originally contributed by Archie Cobbs. */
/*
- * Copyright (c) 2009,2012-2014 by Internet Systems Consortium, Inc. ("ISC")
+ * Copyright (c) 2009,2012-2014,2016 by Internet Systems Consortium, Inc. ("ISC")
* Copyright (c) 2004,2007 by Internet Systems Consortium, Inc. ("ISC")
* Copyright (c) 1996-2003 by Internet Software Consortium
*
@@ -200,7 +200,7 @@ struct bpf_insn dhcp_bpf_filter [] = {
};
#if defined (DEC_FDDI)
-struct bpf_insn *bpf_fddi_filter;
+struct bpf_insn *bpf_fddi_filter = NULL;
#endif
int dhcp_bpf_filter_len = sizeof dhcp_bpf_filter / sizeof (struct bpf_insn);
@@ -285,7 +285,7 @@ void if_register_receive (info)
if (ioctl(info -> rfdesc, BIOCGDLT, &link_layer) >= 0 &&
link_layer == DLT_FDDI) {
if (!bpf_fddi_filter) {
- bpf_fddi_filter = dmalloc (sizeof bpf_fddi_filter,
+ bpf_fddi_filter = dmalloc (sizeof dhcp_bpf_filter,
MDL);
if (!bpf_fddi_filter)
log_fatal ("No memory for FDDI filter.");