summaryrefslogtreecommitdiff
path: root/pppd/demand.c
diff options
context:
space:
mode:
authorPaul Mackerras <paulus@samba.org>2000-12-27 23:27:29 +0000
committerPaul Mackerras <paulus@samba.org>2000-12-27 23:27:29 +0000
commit091da75db0b89484d786858725129bd5863f7adb (patch)
treec42f0fdce82cbe564a677e870564c906600b7c22 /pppd/demand.c
parent9bb2805159a0fbb676fb496fbb992d9c37a1ffa7 (diff)
downloadppp-091da75db0b89484d786858725129bd5863f7adb.tar.gz
only accept frame if it passes the pass filter as well as the
active filter
Diffstat (limited to 'pppd/demand.c')
-rw-r--r--pppd/demand.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/pppd/demand.c b/pppd/demand.c
index adb12b9..957b84a 100644
--- a/pppd/demand.c
+++ b/pppd/demand.c
@@ -17,7 +17,7 @@
* WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.
*/
-#define RCSID "$Id: demand.c,v 1.13 2000/04/15 01:27:11 masputra Exp $"
+#define RCSID "$Id: demand.c,v 1.14 2000/12/27 23:27:29 paulus Exp $"
#include <stdio.h>
#include <stdlib.h>
@@ -330,8 +330,11 @@ active_packet(p, len)
return 0;
proto = PPP_PROTOCOL(p);
#ifdef PPP_FILTER
+ if (pass_filter.bf_len != 0
+ && bpf_filter(pass_filter.bf_insns, p, len, len) == 0)
+ return 0;
if (active_filter.bf_len != 0
- && bpf_filter(active_filter.bf_insns, frame, len, len) == 0)
+ && bpf_filter(active_filter.bf_insns, p, len, len) == 0)
return 0;
#endif
for (i = 0; (protp = protocols[i]) != NULL; ++i) {