summaryrefslogtreecommitdiffstats
path: root/sys/netinet/raw_ip.c
diff options
context:
space:
mode:
Diffstat (limited to 'sys/netinet/raw_ip.c')
-rw-r--r--sys/netinet/raw_ip.c29
1 files changed, 13 insertions, 16 deletions
diff --git a/sys/netinet/raw_ip.c b/sys/netinet/raw_ip.c
index 1bad6dd..b31be39 100644
--- a/sys/netinet/raw_ip.c
+++ b/sys/netinet/raw_ip.c
@@ -70,8 +70,6 @@
#include <netinet6/ipsec.h>
#endif /*IPSEC*/
-#include "opt_ipdn.h"
-
struct inpcbhead ripcb;
struct inpcbinfo ripcbinfo;
@@ -288,19 +286,19 @@ rip_ctloutput(so, sopt)
error = sooptcopyout(sopt, &optval, sizeof optval);
break;
- case IP_FW_ADD:
+ case IP_FW_ADD: /* ADD actually returns the body... */
case IP_FW_GET:
- if (ip_fw_ctl_ptr == NULL)
- error = ENOPROTOOPT;
- else
+ if (IPFW_LOADED)
error = ip_fw_ctl_ptr(sopt);
+ else
+ error = ENOPROTOOPT;
break;
case IP_DUMMYNET_GET:
- if (ip_dn_ctl_ptr == NULL)
- error = ENOPROTOOPT;
- else
+ if (DUMMYNET_LOADED)
error = ip_dn_ctl_ptr(sopt);
+ else
+ error = ENOPROTOOPT;
break ;
case MRT_INIT:
@@ -333,24 +331,23 @@ rip_ctloutput(so, sopt)
inp->inp_flags &= ~INP_HDRINCL;
break;
- case IP_FW_ADD:
case IP_FW_DEL:
case IP_FW_FLUSH:
case IP_FW_ZERO:
case IP_FW_RESETLOG:
- if (ip_fw_ctl_ptr == 0)
- error = ENOPROTOOPT;
- else
+ if (IPFW_LOADED)
error = ip_fw_ctl_ptr(sopt);
+ else
+ error = ENOPROTOOPT;
break;
case IP_DUMMYNET_CONFIGURE:
case IP_DUMMYNET_DEL:
case IP_DUMMYNET_FLUSH:
- if (ip_dn_ctl_ptr == NULL)
- error = ENOPROTOOPT ;
- else
+ if (DUMMYNET_LOADED)
error = ip_dn_ctl_ptr(sopt);
+ else
+ error = ENOPROTOOPT ;
break ;
case IP_RSVP_ON:
OpenPOWER on IntegriCloud