summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorDaniele Di Proietto <diproiettod@vmware.com>2016-12-08 17:43:31 -0800
committerDaniele Di Proietto <diproiettod@vmware.com>2016-12-12 17:25:47 -0800
commit7c76bf4e0e2787b89a84302233918fa04043a969 (patch)
tree51f371b983751093ae194cb51ae852ef8ca59a15 /tests
parent06ca9597a63ea109d1e66ba09c9a28b56f9df6c9 (diff)
downloadopenvswitch-7c76bf4e0e2787b89a84302233918fa04043a969.tar.gz
ovn-northd: Sort options in put_dhcp(v6)_opts.
The order of the options in the packet generated by ovs-controller depends on the hash function. I believe that murmur hash (our default) produces different outputs depending on the endianness of the system. Also, if SSE4.2 is enabled at build time, we use CRC32 for hashing which gives different results even on x86. This causes one unit test to fail on big endian or with SSE4.2: ovn -- dhcpv4 : 1 HV, 2 LS, 2 LSPs/LS This commit fixes the problem in ovn-northd by always sorting dhcp options inside the logical flow put_dhcp(v6)_opts action. Reported-at: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=840770 Suggested-by: Ben Pfaff <blp@ovn.org> Signed-off-by: Daniele Di Proietto <diproiettod@vmware.com> Acked-by: Ben Pfaff <blp@ovn.org>
Diffstat (limited to 'tests')
-rw-r--r--tests/ovn.at4
1 files changed, 2 insertions, 2 deletions
diff --git a/tests/ovn.at b/tests/ovn.at
index cb21210f5..628d3c871 100644
--- a/tests/ovn.at
+++ b/tests/ovn.at
@@ -3754,7 +3754,7 @@ as hv1 ovs-ofctl dump-flows br-int
# Send DHCPDISCOVER.
offer_ip=`ip_to_hex 10 0 0 4`
server_ip=`ip_to_hex 10 0 0 1`
-expected_dhcp_opts=0104ffffff0003040a00000136040a000001330400000e10
+expected_dhcp_opts=330400000e100104ffffff0003040a00000136040a000001
test_dhcp 1 f00000000001 01 $offer_ip ff1000000001 $server_ip $expected_dhcp_opts
# NXT_RESUMEs should be 1.
@@ -3777,7 +3777,7 @@ rm -f 2.expected
# Send DHCPREQUEST.
offer_ip=`ip_to_hex 10 0 0 6`
server_ip=`ip_to_hex 10 0 0 1`
-expected_dhcp_opts=0104ffffff0003040a00000136040a000001330400000e10
+expected_dhcp_opts=330400000e100104ffffff0003040a00000136040a000001
test_dhcp 2 f00000000002 03 $offer_ip ff1000000001 $server_ip $expected_dhcp_opts
# NXT_RESUMEs should be 2.