summaryrefslogtreecommitdiffstats
path: root/sys/netinet/raw_ip.c
diff options
context:
space:
mode:
authorjkh <jkh@FreeBSD.org>1994-11-16 10:17:11 +0000
committerjkh <jkh@FreeBSD.org>1994-11-16 10:17:11 +0000
commite8b4c662322a9ab5c29fc31eaa45041a0ef8b5eb (patch)
treefe6126b4eeffefa1c2cbe50fa4bb9bebcc17fdf4 /sys/netinet/raw_ip.c
parent6f2263602c66db2070a547e628b802cbfa4b37da (diff)
downloadFreeBSD-src-e8b4c662322a9ab5c29fc31eaa45041a0ef8b5eb.zip
FreeBSD-src-e8b4c662322a9ab5c29fc31eaa45041a0ef8b5eb.tar.gz
Ugen J.S.Antsilevich's latest, happiest, IP firewall code.
Poul: Please take this into BETA. It's non-intrusive, and a rather substantial improvement over what was there before.
Diffstat (limited to 'sys/netinet/raw_ip.c')
-rw-r--r--sys/netinet/raw_ip.c19
1 files changed, 18 insertions, 1 deletions
diff --git a/sys/netinet/raw_ip.c b/sys/netinet/raw_ip.c
index 949e427..4b33614 100644
--- a/sys/netinet/raw_ip.c
+++ b/sys/netinet/raw_ip.c
@@ -56,6 +56,9 @@
#ifdef IPFIREWALL
#include <netinet/ip_fw.h>
#endif
+#ifdef IPACCT
+#include <netinet/ip_fw.h>
+#endif
struct inpcb rawinpcb;
@@ -227,7 +230,21 @@ rip_ctloutput(op, so, level, optname, m)
error=EINVAL;
return(error);
#endif
-
+#ifdef IPACCT
+ case IP_ACCT_DEL:
+ case IP_ACCT_ADD:
+ case IP_ACCT_FLUSH:
+ case IP_ACCT_ZERO:
+
+ if (op = PRCO_SETOPT) {
+ error=ip_acct_ctl(optname, *m);
+ if (*m)
+ (void)m_free(*m);
+ }
+ else
+ error=EINVAL;
+ return(error);
+#endif
case IP_RSVP_ON:
error = ip_rsvp_init(so);
OpenPOWER on IntegriCloud