From: Paul Mackerras Date: Wed, 27 Dec 2000 23:27:29 +0000 (+0000) Subject: only accept frame if it passes the pass filter as well as the X-Git-Tag: ppp-2.4.7~517 X-Git-Url: https://git.ozlabs.org/?p=ppp.git;a=commitdiff_plain;h=091da75db0b89484d786858725129bd5863f7adb only accept frame if it passes the pass filter as well as the active filter --- 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 #include @@ -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) {