From: Ben Pfaff Date: Wed, 29 Dec 2010 06:23:43 +0000 (-0800) Subject: multipath: Zero padding bytes in fields before hashing. X-Git-Tag: v1.1.0~567 X-Git-Url: http://git.onelab.eu/?a=commitdiff_plain;h=7cfb3c26b2abb82e95bbecaaf78317e7e7e343d4;p=sliver-openvswitch.git multipath: Zero padding bytes in fields before hashing. Otherwise the hash includes 3 bytes of trailing indeterminate data. Reported-by: Pankaj Thakkar --- diff --git a/lib/multipath.c b/lib/multipath.c index 7d4b541ed..13f88ff02 100644 --- a/lib/multipath.c +++ b/lib/multipath.c @@ -99,6 +99,7 @@ hash_symmetric_l4(const struct flow *flow, uint16_t basis) int i; + memset(&fields, 0, sizeof fields); for (i = 0; i < ETH_ADDR_LEN; i++) { fields.eth_addr[i] = flow->dl_src[i] ^ flow->dl_dst[i]; }