summaryrefslogtreecommitdiff
path: root/usr.sbin
diff options
context:
space:
mode:
authorRafael Zalamena <rzalamena@cvs.openbsd.org>2016-09-26 08:46:01 +0000
committerRafael Zalamena <rzalamena@cvs.openbsd.org>2016-09-26 08:46:01 +0000
commit8d924f6e9df7cf28b8231fde3dc28c4fa87fc202 (patch)
treee2cf1b9354907010d0b403a0324ca993e43a4483 /usr.sbin
parent6511a3216333041a043963e4be9e2d553e33a93f (diff)
Enable more debug messages to help developing flow modification messages.
ok reyk@
Diffstat (limited to 'usr.sbin')
-rw-r--r--usr.sbin/switchd/ofp13.c11
-rw-r--r--usr.sbin/switchd/ofp_map.h5
2 files changed, 14 insertions, 2 deletions
diff --git a/usr.sbin/switchd/ofp13.c b/usr.sbin/switchd/ofp13.c
index 019ff4dbabc..80f5f100f4f 100644
--- a/usr.sbin/switchd/ofp13.c
+++ b/usr.sbin/switchd/ofp13.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ofp13.c,v 1.5 2016/07/21 14:25:36 reyk Exp $ */
+/* $OpenBSD: ofp13.c,v 1.6 2016/09/26 08:46:00 rzalamena Exp $ */
/*
* Copyright (c) 2013-2016 Reyk Floeter <reyk@openbsd.org>
@@ -291,6 +291,15 @@ ofp13_validate_error(struct switchd *sc,
case OFP_ERRTYPE_FLOW_MOD_FAILED:
code = print_map(ntohs(err->err_code), ofp_errflowmod_map);
break;
+ case OFP_ERRTYPE_BAD_MATCH:
+ code = print_map(ntohs(err->err_code), ofp_errmatch_map);
+ break;
+ case OFP_ERRTYPE_BAD_INSTRUCTION:
+ code = print_map(ntohs(err->err_code), ofp_errinst_map);
+ break;
+ case OFP_ERRTYPE_BAD_REQUEST:
+ code = print_map(ntohs(err->err_code), ofp_errreq_map);
+ break;
default:
code = NULL;
break;
diff --git a/usr.sbin/switchd/ofp_map.h b/usr.sbin/switchd/ofp_map.h
index 63d3b30a6b9..3af2756c5b1 100644
--- a/usr.sbin/switchd/ofp_map.h
+++ b/usr.sbin/switchd/ofp_map.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: ofp_map.h,v 1.3 2016/07/20 19:57:54 reyk Exp $ */
+/* $OpenBSD: ofp_map.h,v 1.4 2016/09/26 08:46:00 rzalamena Exp $ */
/*
* Copyright (c) 2013-2016 Reyk Floeter <reyk@openbsd.org>
@@ -52,5 +52,8 @@ extern struct constmap ofp_flowcmd_map[];
extern struct constmap ofp_flowflag_map[];
extern struct constmap ofp_errtype_map[];
extern struct constmap ofp_errflowmod_map[];
+extern struct constmap ofp_errmatch_map[];
+extern struct constmap ofp_errinst_map[];
+extern struct constmap ofp_errreq_map[];
#endif /* _SWITCHD_OFP_MAP_H */