[ovs-dev] [PATCH] multipath: Zero padding bytes in fields before hashing.
Ben Pfaff
blp at nicira.com
Wed Dec 29 06:23:58 UTC 2010
Otherwise the hash includes 3 bytes of trailing indeterminate data.
Reported-by: Pankaj Thakkar <thakkar at nicira.com>
---
lib/multipath.c | 1 +
1 files changed, 1 insertions(+), 0 deletions(-)
diff --git a/lib/multipath.c b/lib/multipath.c
index 7d4b541..13f88ff 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];
}
--
1.7.1
More information about the dev
mailing list