datapath: Initialize tunnel_key pad member.
authorJesse Gross <jesse@nicira.com>
Mon, 31 Dec 2012 20:28:41 +0000 (12:28 -0800)
committerJesse Gross <jesse@nicira.com>
Mon, 31 Dec 2012 20:58:48 +0000 (12:58 -0800)
commit194254d7f3a902a7554e617b8ab6869de388e80b
treeee2f3c52809cd2a28bebd72106154a8d1c1fcd56
parent39bbf1bd166ab5dc9a98066ee6a4e2effabca922
datapath: Initialize tunnel_key pad member.

When a packet is received on a tunnel the pad member is currently
left uninitialized.  This didn't previously cause problems because
userspace didn't interprete the IPV4_TUNNEL attribute and blindly
copied back the uninitialized data.  However, now that userspace
knows how to serialize this attribute it was zeroing it out, which
prevented flows that had been previously installed from being
deleted.  In addition to zeroing out the padding on packet reception,
it also does the same thing on flow setup since we should be ignoring
the value.

Reported-by: Anand Krishnamurthy <krishnamurt4@wisc.edu>
Reported-by: Saul St. John <sstjohn@cs.wisc.edu>
Signed-off-by: Jesse Gross <jesse@nicira.com>
Acked-by: Ben Pfaff <blp@nicira.com>
datapath/flow.c
datapath/tunnel.h