Skip to contentSkip to conversation

bareudp: Fixed configuration to avoid having garbage values

PATCH Applied Martin Varghese 2 participants 2 messages Jun 16, 2020

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 bareudp: Fixed configuration to avoid having garbage values

From: Martin <[email protected]>

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.")
---
 drivers/net/bareudp.c | 2 ++
 1 file changed, 2 insertions(+)
drivers/net/bareudp.c +2 -0
index efd1a1d..5d3c691 100644
@@ -552,6 +552,8 @@ static int bareudp_validate(struct nlattr *tb[], struct nlattr *data[],
 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;
Signature · 1 line
1.8.3.1
maintainer Applied
#1 lore raw

From: Martin Varghese <[email protected]>
Date: Tue, 16 Jun 2020 11:18:58 +0530

Quoted 7 lines

From: Martin <[email protected]>

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.")

Applied, thank you.