-/* $OpenBSD: in.c,v 1.182 2023/04/19 20:03:51 kn Exp $ */
+/* $OpenBSD: in.c,v 1.183 2023/04/21 00:41:13 kn Exp $ */
/* $NetBSD: in.c,v 1.26 1996/02/13 23:41:39 christos Exp $ */
/*
in_control(struct socket *so, u_long cmd, caddr_t data, struct ifnet *ifp)
{
int privileged;
- int error;
privileged = 0;
if ((so->so_state & SS_PRIV) != 0)
#ifdef MROUTING
case SIOCGETVIFCNT:
case SIOCGETSGCNT:
- error = mrt_ioctl(so, cmd, data);
- break;
+ return mrt_ioctl(so, cmd, data);
#endif /* MROUTING */
default:
- error = in_ioctl(cmd, data, ifp, privileged);
- break;
+ return in_ioctl(cmd, data, ifp, privileged);
}
-
- return error;
}
int
-/* $OpenBSD: in6.c,v 1.260 2023/04/19 20:03:52 kn Exp $ */
+/* $OpenBSD: in6.c,v 1.261 2023/04/21 00:41:13 kn Exp $ */
/* $KAME: in6.c,v 1.372 2004/06/14 08:14:21 itojun Exp $ */
/*
in6_control(struct socket *so, u_long cmd, caddr_t data, struct ifnet *ifp)
{
int privileged;
- int error;
privileged = 0;
if ((so->so_state & SS_PRIV) != 0)
#ifdef MROUTING
case SIOCGETSGCNT_IN6:
case SIOCGETMIFCNT_IN6:
- error = mrt6_ioctl(so, cmd, data);
- break;
+ return mrt6_ioctl(so, cmd, data);
#endif /* MROUTING */
default:
- error = in6_ioctl(cmd, data, ifp, privileged);
- break;
+ return in6_ioctl(cmd, data, ifp, privileged);
}
-
- return error;
}
int