summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFlorian Obser <florian@cvs.openbsd.org>2018-04-24 19:53:39 +0000
committerFlorian Obser <florian@cvs.openbsd.org>2018-04-24 19:53:39 +0000
commit200290c1434be8cfc1b95d93723d226f72ddbebe (patch)
treed464dc12b8ee0126b1b3932c80956efd091b23fc
parent91d3c8262b6c45291d7af0a6877f9f0243c11f80 (diff)
Make the ramdisks compile again, we don't have MROUTING on them.
Found the hard way.
-rw-r--r--sys/netinet/in.c14
-rw-r--r--sys/netinet6/in6.c14
2 files changed, 14 insertions, 14 deletions
diff --git a/sys/netinet/in.c b/sys/netinet/in.c
index fbf73d6880f..eda6ac60b97 100644
--- a/sys/netinet/in.c
+++ b/sys/netinet/in.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: in.c,v 1.148 2018/04/24 15:40:55 pirofti Exp $ */
+/* $OpenBSD: in.c,v 1.149 2018/04/24 19:53:38 florian Exp $ */
/* $NetBSD: in.c,v 1.26 1996/02/13 23:41:39 christos Exp $ */
/*
@@ -192,18 +192,18 @@ in_control(struct socket *so, u_long cmd, caddr_t data, struct ifnet *ifp)
if ((so->so_state & SS_PRIV) != 0)
privileged++;
-#ifdef MROUTING
switch (cmd) {
+#ifdef MROUTING
case SIOCGETVIFCNT:
case SIOCGETSGCNT:
error = mrt_ioctl(so, cmd, data);
- goto out;
- }
+ break;
#endif /* MROUTING */
+ default:
+ error = in_ioctl(cmd, data, ifp, privileged);
+ break;
+ }
- error = in_ioctl(cmd, data, ifp, privileged);
-
-out:
NET_UNLOCK();
return error;
}
diff --git a/sys/netinet6/in6.c b/sys/netinet6/in6.c
index a89c306d713..ac9e25aafc1 100644
--- a/sys/netinet6/in6.c
+++ b/sys/netinet6/in6.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: in6.c,v 1.221 2018/04/24 15:40:55 pirofti Exp $ */
+/* $OpenBSD: in6.c,v 1.222 2018/04/24 19:53:38 florian Exp $ */
/* $KAME: in6.c,v 1.372 2004/06/14 08:14:21 itojun Exp $ */
/*
@@ -188,18 +188,18 @@ in6_control(struct socket *so, u_long cmd, caddr_t data, struct ifnet *ifp)
if ((so->so_state & SS_PRIV) != 0)
privileged++;
-#ifdef MROUTING
switch (cmd) {
+#ifdef MROUTING
case SIOCGETSGCNT_IN6:
case SIOCGETMIFCNT_IN6:
error = mrt6_ioctl(so, cmd, data);
- goto out;
- }
+ break;
#endif /* MROUTING */
+ default:
+ error = in6_ioctl(cmd, data, ifp, privileged);
+ break;
+ }
- error = in6_ioctl(cmd, data, ifp, privileged);
-
-out:
NET_UNLOCK();
return error;
}