From dc6fe1d7ee2f1dbafea795c110ccdbb54a5946e5 Mon Sep 17 00:00:00 2001
From: Jean Tourrihles <jt@hpl.hp.com>
Date: Fri, 11 Sep 2009 15:19:15 -0700
Subject: [PATCH] vconn: Fix byte-swapping of message type when validating
 OpenFlow actions.

It seems really strange that this one slipped through.  Perhaps this
means that we have never tested with any action other than OFPAT_OUTPUT
(which has value 0 and thus is not affected by byte-swapping).
---
 lib/vconn.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/lib/vconn.c b/lib/vconn.c
index b5e110204..12680c5ba 100644
--- a/lib/vconn.c
+++ b/lib/vconn.c
@@ -1247,7 +1247,7 @@ check_action(const union ofp_action *a, unsigned int len, int max_ports)
 {
     int error;
 
-    switch (a->type) {
+    switch (ntohs(a->type)) {
     case OFPAT_OUTPUT:
         error = check_action_port(ntohs(a->output.port), max_ports);
         if (error) {
-- 
2.47.0