[ovs-dev] [PATCH] netdev-vport: Properly initialize tnl_port_config structure to 0.

Ben Pfaff blp at nicira.com
Tue Dec 7 18:42:06 UTC 2010


Otherwise the configuration starts out indeterminate and tends to be
rejected by the kernel.

Bug #4195.
---
I already pushed this patch out since it is both obvious and causing
problems, but I'm emailing it to the list anyhow in case anyone has
comments.

 lib/netdev-vport.c |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

diff --git a/lib/netdev-vport.c b/lib/netdev-vport.c
index f0de376..f101b93 100644
--- a/lib/netdev-vport.c
+++ b/lib/netdev-vport.c
@@ -438,6 +438,7 @@ parse_tunnel_config(const struct netdev_dev *dev, const struct shash *args,
     bool ipsec_ip_set = false;
     bool ipsec_mech_set = false;
 
+    memset(&config, 0, sizeof config);
     config.flags |= TNL_F_PMTUD;
     config.flags |= TNL_F_HDR_CACHE;
 
-- 
1.7.1





More information about the dev mailing list