From 091da75db0b89484d786858725129bd5863f7adb Mon Sep 17 00:00:00 2001 From: Paul Mackerras Date: Wed, 27 Dec 2000 23:27:29 +0000 Subject: [PATCH] only accept frame if it passes the pass filter as well as the active filter --- pppd/demand.c | 7 +++++-- 1 file 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 #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) { -- 2.39.2