Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/netmpls add missing KASSERT(req != PRU_XXX) to mpls_usrr...
details: https://anonhg.NetBSD.org/src/rev/396d6fbbb0b2
branches: trunk
changeset: 797855:396d6fbbb0b2
user: rtr <rtr%NetBSD.org@localhost>
date: Thu Jul 31 05:37:00 2014 +0000
description:
add missing KASSERT(req != PRU_XXX) to mpls_usrreq() for PRUs that have
already been split.
diffstat:
sys/netmpls/mpls_proto.c | 21 +++++++++++++++++++--
1 files changed, 19 insertions(+), 2 deletions(-)
diffs (42 lines):
diff -r e57fc8936906 -r 396d6fbbb0b2 sys/netmpls/mpls_proto.c
--- a/sys/netmpls/mpls_proto.c Thu Jul 31 05:13:53 2014 +0000
+++ b/sys/netmpls/mpls_proto.c Thu Jul 31 05:37:00 2014 +0000
@@ -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 @@
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;
}
Home |
Main Index |
Thread Index |
Old Index