diff options
author | Paul Mackerras <paulus@samba.org> | 2000-12-27 23:27:29 +0000 |
---|---|---|
committer | Paul Mackerras <paulus@samba.org> | 2000-12-27 23:27:29 +0000 |
commit | 091da75db0b89484d786858725129bd5863f7adb (patch) | |
tree | c42f0fdce82cbe564a677e870564c906600b7c22 /pppd | |
parent | 9bb2805159a0fbb676fb496fbb992d9c37a1ffa7 (diff) | |
download | ppp-091da75db0b89484d786858725129bd5863f7adb.tar.gz |
only accept frame if it passes the pass filter as well as the
active filter
Diffstat (limited to 'pppd')
-rw-r--r-- | pppd/demand.c | 7 |
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) { |