]> git.ozlabs.org Git - ppp.git/commitdiff
Changing PPP_FILTER to PPP_WITH_FILTER for consistency.
authorEivind Næss <eivnaes@yahoo.com>
Fri, 6 Aug 2021 23:52:33 +0000 (16:52 -0700)
committerEivind Næss <eivnaes@yahoo.com>
Fri, 15 Jul 2022 22:25:39 +0000 (15:25 -0700)
Signed-off-by: Eivind Næss <eivnaes@yahoo.com>
configure.ac
include/net/if_ppp.h
pppd/Makefile.am
pppd/auth.c
pppd/demand.c
pppd/options.c
pppd/pppd.h
pppd/pppdconf.h.in
pppd/sys-linux.c
pppd/sys-solaris.c

index 3e01cf24324ab9c3645e479dfadd290c82138614..af62cace7b35afcb77c4dec239416a8d05fa42ae 100644 (file)
@@ -284,9 +284,9 @@ AX_CHECK_PCAP
 
 #
 # SunOS provides a version of libpcap that would work, but SunOS has no support for activity filter
-AM_CONDITIONAL([WITH_FILTER], [ test "x${with_pcap}" = "xyes" && test "x${build_sunos}" != "xyes" ])
-AM_COND_IF([WITH_FILTER], [
-    AC_DEFINE([PPP_FILTER], 1, ["Have packet activity filter support"])], [
+AM_CONDITIONAL([PPP_WITH_FILTER], [ test "x${with_pcap}" = "xyes" && test "x${build_sunos}" != "xyes" ])
+AM_COND_IF([PPP_WITH_FILTER], [
+    AC_DEFINE([PPP_WITH_FILTER], 1, ["Have packet activity filter support"])], [
     AS_IF([test "x${build_sunos}" = "xyes"], [
         AC_MSG_WARN([Packet activity filter not supported on SunOS])
         with_pcap="no"
index d08605e3cbd9d34e8c5ff1a0403202d4e3d4b9f9..1beb4707663c55a5623ac30575d5f4bcc9a79764 100644 (file)
@@ -129,10 +129,10 @@ struct ifpppcstatsreq {
 #define PPPIOCGNPMODE  _IOWR('t', 76, struct npioctl) /* get NP mode */
 #define PPPIOCSNPMODE  _IOW('t', 75, struct npioctl)  /* set NP mode */
 #define PPPIOCGIDLE    _IOR('t', 74, struct ppp_idle) /* get idle time */
-#ifdef PPP_FILTER
+#ifdef PPP_WITH_FILTER
 #define PPPIOCSPASS    _IOW('t', 71, struct bpf_program) /* set pass filter */
 #define PPPIOCSACTIVE  _IOW('t', 70, struct bpf_program) /* set active filt */
-#endif /* PPP_FILTER */
+#endif /* PPP_WITH_FILTER */
 
 /* PPPIOC[GS]MTU are alternatives to SIOC[GS]IFMTU, used under Ultrix */
 #define PPPIOCGMTU     _IOR('t', 73, int)      /* get interface MTU */
index d70dd26995cc68726868c3b6dd7cafaf7099e4a4..2cf2400630a31d2229cf5fe32c6ca969d59aa431 100644 (file)
@@ -101,7 +101,7 @@ if PPP_WITH_MPPE
 pppd_SOURCES += mppe.c
 endif
 
-if WITH_FILTER
+if PPP_WITH_FILTER
 pppd_CPPFLAGS += $(PCAP_CFLAGS)
 pppd_LDFLAGS += $(PCAP_LDFLAGS)
 pppd_LIBS += $(PCAP_LIBS)
index c6e234417018ba5cb46eb3dd42ee867ee7048bfe..5a7863d2742a2cbfd7161b14cd3b103d6b5bdcf5 100644 (file)
@@ -949,7 +949,7 @@ start_networks(int unit)
     }
 #endif /* PPP_WITH_MULTILINK */
 
-#ifdef PPP_FILTER
+#ifdef PPP_WITH_FILTER
     if (!demand)
        set_filters(&pass_filter, &active_filter);
 #endif
index 0943e8a381ad5ce8ee2b12b3438708357f0c63d1..3e320798355de806223d0dd11896e19892da0930 100644 (file)
@@ -47,7 +47,7 @@
 #include <sys/resource.h>
 #include <sys/stat.h>
 #include <sys/socket.h>
-#ifdef PPP_FILTER
+#ifdef PPP_WITH_FILTER
 #include <pcap-bpf.h>
 #endif
 
@@ -102,7 +102,7 @@ demand_conf(void)
        || ppp_recv_config(0, PPP_MRU, (u_int32_t) 0, 0, 0) < 0)
            fatal("Couldn't set up demand-dialled PPP interface: %m");
 
-#ifdef PPP_FILTER
+#ifdef PPP_WITH_FILTER
     set_filters(&pass_filter, &active_filter);
 #endif
 
@@ -336,7 +336,7 @@ active_packet(unsigned char *p, int len)
     if (len < PPP_HDRLEN)
        return 0;
     proto = PPP_PROTOCOL(p);
-#ifdef PPP_FILTER
+#ifdef PPP_WITH_FILTER
     p[0] = 1;          /* outbound packet indicator */
     if ((pass_filter.bf_len != 0
         && bpf_filter(pass_filter.bf_insns, p, len, len) == 0)
index b35c0591eb0e85d20be96a9c639b7497c35a40d3..e93c91510e03bb53b28734a91e790e67ecb903bc 100644 (file)
@@ -58,7 +58,7 @@
 #include <dlfcn.h>
 #endif
 
-#ifdef PPP_FILTER
+#ifdef PPP_WITH_FILTER
 #include <pcap.h>
 /*
  * There have been 3 or 4 different names for this in libpcap CVS, but
@@ -73,7 +73,7 @@
 #define DLT_PPP_PPPD   DLT_PPP
 #endif
 #endif
-#endif /* PPP_FILTER */
+#endif /* PPP_WITH_FILTER */
 
 #include "pppd.h"
 #include "pathnames.h"
@@ -146,7 +146,7 @@ int maxoctets_timeout = 1;   /* default 1 second */
 extern option_t auth_options[];
 extern struct stat devstat;
 
-#ifdef PPP_FILTER
+#ifdef PPP_WITH_FILTER
 struct bpf_program pass_filter;/* Filter program for packets to pass */
 struct bpf_program active_filter; /* Filter program for link-active pkts */
 #endif
@@ -177,7 +177,7 @@ static int setlogfile(char **);
 static int loadplugin(char **);
 #endif
 
-#ifdef PPP_FILTER
+#ifdef PPP_WITH_FILTER
 static int setpassfilter(char **);
 static int setactivefilter(char **);
 #endif
@@ -363,7 +363,7 @@ option_t general_options[] = {
       "Load a plug-in module into pppd", OPT_PRIV | OPT_A2LIST },
 #endif
 
-#ifdef PPP_FILTER
+#ifdef PPP_WITH_FILTER
     { "pass-filter", o_special, setpassfilter,
       "set filter for packets to pass", OPT_PRIO },
 
@@ -1482,7 +1482,7 @@ callfile(char **argv)
     return ok;
 }
 
-#ifdef PPP_FILTER
+#ifdef PPP_WITH_FILTER
 /*
  * setpassfilter - Set the pass filter for packets
  */
index c941b323d69e041a73ab72d95cf77e48bcddbb3e..133ccf6b44aa11578e59384ffb1e41a2a5bae47b 100644 (file)
@@ -377,7 +377,7 @@ extern int       maxoctets_timeout;  /* Timeout for check of octets limit */
 #define PPP_OCTETS_DIRECTION_MAXSESSION 4
 #endif
 
-#ifdef PPP_FILTER
+#ifdef PPP_WITH_FILTER
 extern struct  bpf_program pass_filter;   /* Filter for pkts to pass */
 extern struct  bpf_program active_filter; /* Filter for link-active pkts */
 #endif
@@ -721,7 +721,7 @@ void logwtmp(const char *, const char *, const char *);
                                /* Write entry to wtmp file */
 int  get_host_seed(void);      /* Get host-dependent random number seed */
 int  have_route_to(u_int32_t); /* Check if route to addr exists */
-#ifdef PPP_FILTER
+#ifdef PPP_WITH_FILTER
 int  set_filters(struct bpf_program *pass, struct bpf_program *active);
                                /* Set filter programs in kernel */
 #endif
index dfad5b31677d09aa8100b17c0d2467abfb2e629f..a77e3eb970089f37629e9263bf96967b00ea0b50 100644 (file)
@@ -15,8 +15,8 @@
 /* "Have multilink support" */
 #undef PPP_WITH_MULTILINK
 
-/* "Have packet activity filter support" */
-#undef PPP_FILTER
+/* Have packet activity filter support */
+#undef PPP_WITH_FILTER
 
 /* "Have support for loadable plugins" */
 #undef PPP_WITH_PLUGINS
index 94e5a19ed4c67cc44f97b2257c3b0d57b4ed15a0..329a141d2940024b0efec25e416eb5d53a315a88 100644 (file)
 #include "fsm.h"
 #include "ipcp.h"
 
-#ifdef PPP_FILTER
+#ifdef PPP_WITH_FILTER
 #include <pcap-bpf.h>
 #include <linux/filter.h>
-#endif /* PPP_FILTER */
+#endif /* PPP_WITH_FILTER */
 
 #ifdef LOCKLIB
 #include <sys/locks.h>
@@ -1425,7 +1425,7 @@ void ccp_flags_set (int unit, int isopen, int isup)
                modify_flags(ppp_dev_fd, SC_CCP_OPEN|SC_CCP_UP, x);
 }
 
-#ifdef PPP_FILTER
+#ifdef PPP_WITH_FILTER
 /*
  * set_filters - set the active and pass filters in the kernel driver.
  */
@@ -1450,7 +1450,7 @@ int set_filters(struct bpf_program *pass, struct bpf_program *active)
        }
        return 1;
 }
-#endif /* PPP_FILTER */
+#endif /* PPP_WITH_FILTER */
 
 /********************************************************************
  *
index 8ba5ec1bf198027bdfd17932a296204a5dae53dd..080a3b653629e19b40f136e338b5d2c153e2f016 100644 (file)
 #include <sys/ethernet.h>
 #endif
 
-#ifdef PPP_FILTER
+#ifdef PPP_WITH_FILTER
 #include <pcap.h>
 #endif