ofproto-dpif: Correct endian problem in recv_upcalls()
authorSimon Horman <horms@verge.net.au>
Tue, 1 Oct 2013 06:15:22 +0000 (15:15 +0900)
committerBen Pfaff <blp@nicira.com>
Tue, 1 Oct 2013 15:20:55 +0000 (08:20 -0700)
commitbe58eabb281bafffc2eb60c2ee31446f312a2a83
treec376c7beae52d8e55373a8c223fa9b0726dbec2a
parent10e576406c7444ef198cc2d4b6c4adfe242c085c
ofproto-dpif: Correct endian problem in recv_upcalls()

Use nl_attr_get_u32() instead of nl_attr_get_be32() to parse nla
so that the decoded value which is passed to mhash_add()
is host byte order as mhash_add() expects.

This resolves a minor regression introduced by
10e576406c7444ef ("ofproto-dpif: Move special upcall handling into
ofproto-dpif-upcall.").

I do not expect this change has any runtime implications.

Detected using sparse.

Cc: Ethan Jackson <ethan@nicira.com>
Cc: Ben Pfaff <blp@nicira.com>
Signed-off-by: Simon Horman <horms@verge.net.au>
Signed-off-by: Ben Pfaff <blp@nicira.com>
ofproto/ofproto-dpif-upcall.c