From 91cfc8f5dcde72a1b0d712f49eadd0aafab23af4 Mon Sep 17 00:00:00 2001 From: Justin Pettit Date: Mon, 30 Jun 2008 15:58:44 -0700 Subject: [PATCH] Don't allow adding a flow entry with an output port of OFPP_NONE. --- datapath/forward.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/datapath/forward.c b/datapath/forward.c index e0b07011..fcbc59b3 100644 --- a/datapath/forward.c +++ b/datapath/forward.c @@ -371,7 +371,8 @@ add_flow(struct sw_chain *chain, const struct ofp_flow_mod *ofm) const struct ofp_action *a = &ofm->actions[i]; if (a->type == htons(OFPAT_OUTPUT) - && a->arg.output.port == htons(OFPP_TABLE)) { + && (a->arg.output.port == htons(OFPP_TABLE) + || a->arg.output.port == htons(OFPP_NONE))) { /* xxx Send fancy new error message? */ goto error; } -- 2.30.2