From 200290c1434be8cfc1b95d93723d226f72ddbebe Mon Sep 17 00:00:00 2001 From: Florian Obser Date: Tue, 24 Apr 2018 19:53:39 +0000 Subject: Make the ramdisks compile again, we don't have MROUTING on them. Found the hard way. --- sys/netinet/in.c | 14 +++++++------- sys/netinet6/in6.c | 14 +++++++------- 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; } -- cgit v1.2.3