summaryrefslogtreecommitdiffstats
path: root/usr.sbin
diff options
context:
space:
mode:
Diffstat (limited to 'usr.sbin')
-rw-r--r--usr.sbin/ppp/filter.c6
-rw-r--r--usr.sbin/ppp/filter.h4
-rw-r--r--usr.sbin/ppp/ip.c6
3 files changed, 13 insertions, 3 deletions
diff --git a/usr.sbin/ppp/filter.c b/usr.sbin/ppp/filter.c
index 3287ca5..1c66fb3 100644
--- a/usr.sbin/ppp/filter.c
+++ b/usr.sbin/ppp/filter.c
@@ -17,7 +17,7 @@
* IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
* WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.
*
- * $Id: filter.c,v 1.33 1999/07/28 03:01:51 brian Exp $
+ * $Id: filter.c,v 1.34 1999/08/02 11:53:16 brian Exp $
*
* TODO: Shoud send ICMP error message when we discard packets.
*/
@@ -277,6 +277,7 @@ ParseIgmp(int argc, char const * const *argv, struct filterent *tgt)
return 1;
}
+#ifdef P_OSPF
static int
ParseOspf(int argc, char const * const *argv, struct filterent *tgt)
{
@@ -292,6 +293,7 @@ ParseOspf(int argc, char const * const *argv, struct filterent *tgt)
return 1;
}
+#endif
static unsigned
addrtype(const char *addr)
@@ -451,9 +453,11 @@ Parse(struct ipcp *ipcp, int argc, char const *const *argv,
case P_IGMP:
val = ParseIgmp(argc, argv, &filterdata);
break;
+#ifdef P_OSPF
case P_OSPF:
val = ParseOspf(argc, argv, &filterdata);
break;
+#endif
}
log_Printf(LogDEBUG, "Parse: Src: %s\n", inet_ntoa(filterdata.f_src.ipaddr));
diff --git a/usr.sbin/ppp/filter.h b/usr.sbin/ppp/filter.h
index 0f35ae2..46443c8 100644
--- a/usr.sbin/ppp/filter.h
+++ b/usr.sbin/ppp/filter.h
@@ -15,7 +15,7 @@
* IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
* WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.
*
- * $Id: filter.h,v 1.17 1999/07/27 23:43:59 brian Exp $
+ * $Id: filter.h,v 1.18 1999/08/02 11:53:16 brian Exp $
*
* TODO:
*/
@@ -25,7 +25,9 @@
#define P_TCP 1
#define P_UDP 2
#define P_ICMP 3
+#ifdef IPPROTO_OSPFIGP
#define P_OSPF 4
+#endif
#define P_IGMP 5
/* Operations - f_srcop, f_dstop */
diff --git a/usr.sbin/ppp/ip.c b/usr.sbin/ppp/ip.c
index 3ad2de6..d670c29 100644
--- a/usr.sbin/ppp/ip.c
+++ b/usr.sbin/ppp/ip.c
@@ -17,7 +17,7 @@
* IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
* WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.
*
- * $Id: ip.c,v 1.65 1999/07/27 23:43:59 brian Exp $
+ * $Id: ip.c,v 1.66 1999/08/02 11:53:16 brian Exp $
*
* TODO:
* o Return ICMP message for filterd packet
@@ -179,6 +179,7 @@ FilterCheck(const struct ip *pip, const struct filter *filter)
estab = syn = finrst = -1;
sport = ntohs(0);
break;
+#ifdef IPPROTO_OSPFIGP
case IPPROTO_OSPFIGP:
cproto = P_OSPF;
if (datalen < 8) /* IGMP uses 8-octet messages */
@@ -186,6 +187,7 @@ FilterCheck(const struct ip *pip, const struct filter *filter)
estab = syn = finrst = -1;
sport = ntohs(0);
break;
+#endif
case IPPROTO_UDP:
case IPPROTO_IPIP:
cproto = P_UDP;
@@ -357,6 +359,7 @@ PacketCheck(struct bundle *bundle, char *cp, int nb, struct filter *filter)
loglen += strlen(logbuf + loglen);
}
break;
+#ifdef IPPROTO_OSPFIGP
case IPPROTO_OSPFIGP:
if (logit && loglen < sizeof logbuf) {
snprintf(logbuf + loglen, sizeof logbuf - loglen,
@@ -367,6 +370,7 @@ PacketCheck(struct bundle *bundle, char *cp, int nb, struct filter *filter)
loglen += strlen(logbuf + loglen);
}
break;
+#endif
case IPPROTO_IPIP:
if (logit && loglen < sizeof logbuf) {
uh = (struct udphdr *) ptop;
OpenPOWER on IntegriCloud