From: Jean Tourrihles Date: Fri, 11 Sep 2009 22:19:15 +0000 (-0700) Subject: vconn: Fix byte-swapping of message type when validating OpenFlow actions. X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=dc6fe1d7ee2f1dbafea795c110ccdbb54a5946e5;p=openvswitch 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). --- diff --git a/lib/vconn.c b/lib/vconn.c index b5e11020..12680c5b 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) {