[ovs-dev] [PATCH 14/19] ofp-util: Allow decoding of Open Flow 1.2 Port Mod Messages

Simon Horman horms at verge.net.au
Wed Jun 13 23:52:02 UTC 2012


Signed-off-by: Simon Horman <horms at verge.net.au>
---
 lib/ofp-util.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/lib/ofp-util.c b/lib/ofp-util.c
index 880e92b..d0e1b9a 100644
--- a/lib/ofp-util.c
+++ b/lib/ofp-util.c
@@ -820,6 +820,8 @@ static const struct ofputil_msg_type ofputil_msg_types[] = {
     }
     OFPT12(OFPT11_FLOW_MOD,     OFPT11_FLOW_MOD,
            sizeof(struct ofp11_flow_mod), 1),
+    OFPT12(OFPT_PORT_MOD,       OFPT11_PORT_MOD,
+           sizeof(struct ofp11_port_mod), 0),
 #undef OPFT12
 
 #define OFPST10_REQUEST(STAT, RAW_STAT, MIN_SIZE, EXTRA_MULTIPLE)  \
@@ -3080,7 +3082,7 @@ ofputil_decode_port_mod(const struct ofp_header *oh,
         pm->config = ntohl(opm->config) & OFPPC10_ALL;
         pm->mask = ntohl(opm->mask) & OFPPC10_ALL;
         pm->advertise = netdev_port_features_from_ofp10(opm->advertise);
-    } else if (oh->version == OFP11_VERSION) {
+    } else if (oh->version == OFP11_VERSION || oh->version == OFP12_VERSION) {
         const struct ofp11_port_mod *opm = (const struct ofp11_port_mod *) oh;
         enum ofperr error;
 
-- 
1.7.10.2.484.gcd07cc5




More information about the dev mailing list