Skip to content

Commit

Permalink
add missing KASSERT(req != PRU_XXX) to mpls_usrreq() for PRUs that have
Browse files Browse the repository at this point in the history
already been split.
  • Loading branch information
rtr committed Jul 31, 2014
1 parent 731057c commit 8e3b562
Showing 1 changed file with 19 additions and 2 deletions.
21 changes: 19 additions & 2 deletions sys/netmpls/mpls_proto.c
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/* $NetBSD: mpls_proto.c,v 1.19 2014/07/31 03:39:35 rtr Exp $ */
/* $NetBSD: mpls_proto.c,v 1.20 2014/07/31 05:37:00 rtr Exp $ */

/*
* Copyright (c) 2010 The NetBSD Foundation, Inc.
Expand Down Expand Up @@ -30,7 +30,7 @@
*/

#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: mpls_proto.c,v 1.19 2014/07/31 03:39:35 rtr Exp $");
__KERNEL_RCSID(0, "$NetBSD: mpls_proto.c,v 1.20 2014/07/31 05:37:00 rtr Exp $");

#include "opt_inet.h"
#include "opt_mbuftrace.h"
Expand Down Expand Up @@ -200,6 +200,23 @@ static int
mpls_usrreq(struct socket *so, int req, struct mbuf *m,
struct mbuf *nam, struct mbuf *control, struct lwp *l)
{

KASSERT(req != PRU_ATTACH);
KASSERT(req != PRU_DETACH);
KASSERT(req != PRU_ACCEPT);
KASSERT(req != PRU_BIND);
KASSERT(req != PRU_LISTEN);
KASSERT(req != PRU_CONNECT);
KASSERT(req != PRU_DISCONNECT);
KASSERT(req != PRU_SHUTDOWN);
KASSERT(req != PRU_ABORT);
KASSERT(req != PRU_CONTROL);
KASSERT(req != PRU_SENSE);
KASSERT(req != PRU_PEERADDR);
KASSERT(req != PRU_SOCKADDR);
KASSERT(req != PRU_RCVOOB);
KASSERT(req != PRU_SENDOOB);

return EOPNOTSUPP;
}

Expand Down

0 comments on commit 8e3b562

Please sign in to comment.