meta-flow: Fix mf_get_value() retrieval of register values.
authorBen Pfaff <blp@nicira.com>
Tue, 11 Oct 2011 13:58:49 +0000 (06:58 -0700)
committerBen Pfaff <blp@nicira.com>
Wed, 12 Oct 2011 03:01:32 +0000 (20:01 -0700)
lib/meta-flow.c

index f2f1348474428f7c731aa74832ae5a3acdb9c528..d5226f021a60e08ef0a9564463b4e07ab4dcd35f 100644 (file)
@@ -716,7 +716,7 @@ mf_get_value(const struct mf_field *mf, const struct flow *flow,
 #if FLOW_N_REGS > 5
 #error
 #endif
-        value->be32 = htonl(flow->regs[0]);
+        value->be32 = htonl(flow->regs[mf->id - MFF_REG0]);
         break;
 
     case MFF_ETH_SRC: