ofp-print: Fix misaligned data access in ofp_print_error_msg().
authorBen Pfaff <blp@nicira.com>
Sat, 5 Apr 2014 02:26:22 +0000 (19:26 -0700)
committerBen Pfaff <blp@nicira.com>
Sat, 5 Apr 2014 18:14:33 +0000 (11:14 -0700)
commitaa03508aa7d654b13f490d15973308270c24762c
treee6062e0f19740b5f810ef239e7d8880e3ed47c1f
parent21db3de7f1e1c0972efe3e735970630f39ade608
ofp-print: Fix misaligned data access in ofp_print_error_msg().

The body of an OpenFlow error message often contains an inner OpenFlow
message, and when it does, the inner message starts at an odd multiple of 4
bytes from the beginning of the outer message.  That means that, on RISC
systems, accessing the inner message directly causes a bus error.  This
commit fixes the problem in a way that should make it difficult to recur.

This fixes the failure of tests 643, 645, and 651 on sparc seen here:
https://buildd.debian.org/status/fetch.php?pkg=openvswitch&arch=sparc&ver=2.1.0%2Bgit20140325-1&stamp=1396438624

Signed-off-by: Ben Pfaff <blp@nicira.com>
Acked-by: Jarno Rajahalme <jrajahalme@nicira.com>
lib/ofp-errors.c
lib/ofp-print.c