diff options
author | sos <sos@FreeBSD.org> | 1996-08-21 21:37:07 +0000 |
---|---|---|
committer | sos <sos@FreeBSD.org> | 1996-08-21 21:37:07 +0000 |
commit | 6fc54fe251487977f8ca4fe6fc5c87f29dc9a5a3 (patch) | |
tree | 1a5729bda0705ded4c0ab671ff54ccd91014adb1 /sys/netinet/raw_ip.c | |
parent | 4eedb7433af834c9187bfa17388837c82bd98be1 (diff) | |
download | FreeBSD-src-6fc54fe251487977f8ca4fe6fc5c87f29dc9a5a3.zip FreeBSD-src-6fc54fe251487977f8ca4fe6fc5c87f29dc9a5a3.tar.gz |
Add hooks for an IP NAT module, much like the firewall stuff...
Move the sockopt definitions for the firewall code from
ip_fw.h to in.h where it belongs.
Diffstat (limited to 'sys/netinet/raw_ip.c')
-rw-r--r-- | sys/netinet/raw_ip.c | 15 |
1 files changed, 11 insertions, 4 deletions
diff --git a/sys/netinet/raw_ip.c b/sys/netinet/raw_ip.c index be5c13b..a6c80bf 100644 --- a/sys/netinet/raw_ip.c +++ b/sys/netinet/raw_ip.c @@ -31,7 +31,7 @@ * SUCH DAMAGE. * * @(#)raw_ip.c 8.7 (Berkeley) 5/15/95 - * $Id: raw_ip.c,v 1.32 1996/07/20 00:16:20 alex Exp $ + * $Id: raw_ip.c,v 1.33 1996/07/24 18:46:18 wollman Exp $ */ #include <sys/param.h> @@ -235,23 +235,30 @@ rip_ctloutput(op, so, level, optname, m) #ifdef COMPAT_IPFW case IP_FW_GET: - if (ip_fw_ctl_ptr==NULL || op == PRCO_SETOPT) { + if (ip_fw_ctl_ptr == NULL || op == PRCO_SETOPT) { if (*m) (void)m_free(*m); return(EINVAL); } return (*ip_fw_ctl_ptr)(optname, m); + case IP_FW_ADD: case IP_FW_DEL: case IP_FW_FLUSH: case IP_FW_ZERO: - if (ip_fw_ctl_ptr==NULL || op != PRCO_SETOPT) { + if (ip_fw_ctl_ptr == NULL || op != PRCO_SETOPT) { if (*m) (void)m_free(*m); return(EINVAL); } - return (*ip_fw_ctl_ptr)(optname, m); #endif + case IP_NAT: + if (ip_nat_ctl_ptr == NULL) { + if (*m) (void)m_free(*m); + return(EINVAL); + } + return (*ip_nat_ctl_ptr)(optname, m); + case IP_RSVP_ON: return ip_rsvp_init(so); break; |