Module Name:    src
Committed By:   rtr
Date:           Thu Jul 31 05:37:00 UTC 2014

Modified Files:
        src/sys/netmpls: mpls_proto.c

Log Message:
add missing KASSERT(req != PRU_XXX) to mpls_usrreq() for PRUs that have
already been split.


To generate a diff of this commit:
cvs rdiff -u -r1.19 -r1.20 src/sys/netmpls/mpls_proto.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/netmpls/mpls_proto.c
diff -u src/sys/netmpls/mpls_proto.c:1.19 src/sys/netmpls/mpls_proto.c:1.20
--- src/sys/netmpls/mpls_proto.c:1.19	Thu Jul 31 03:39:35 2014
+++ src/sys/netmpls/mpls_proto.c	Thu Jul 31 05:37:00 2014
@@ -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.
@@ -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"
@@ -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;
 }
 

Reply via email to