Blob Blame History Raw
From: Martin <martin.varghese@nokia.com>
Date: Tue, 16 Jun 2020 11:18:58 +0530
Subject: bareudp: Fixed configuration to avoid having garbage values
Patch-mainline: v5.8-rc2
Git-commit: b15bb8817f991497d97ae55d8c0e349a9d1e1478
References: jsc#SLE-15172

Code to initialize the conf structure while gathering the configuration
of the device was missing.

Fixes: 571912c69f0e ("net: UDP tunnel encapsulation module for tunnelling different protocols like MPLS, IP, NSH etc.")
Signed-off-by: Martin <martin.varghese@nokia.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Acked-by: Thomas Bogendoerfer <tbogendoerfer@suse.de>
---
 drivers/net/bareudp.c |    2 ++
 1 file changed, 2 insertions(+)

--- a/drivers/net/bareudp.c
+++ b/drivers/net/bareudp.c
@@ -552,6 +552,8 @@ static int bareudp_validate(struct nlatt
 static int bareudp2info(struct nlattr *data[], struct bareudp_conf *conf,
 			struct netlink_ext_ack *extack)
 {
+	memset(conf, 0, sizeof(*conf));
+
 	if (!data[IFLA_BAREUDP_PORT]) {
 		NL_SET_ERR_MSG(extack, "port not specified");
 		return -EINVAL;