[PATCH net] bareudp: Fixed configuration to avoid having garbage values

Subsystems: networking drivers, the rest

STALE2247d

2 messages, 2 authors, 2020-06-16 · open the first message on its own page

[PATCH net] bareudp: Fixed configuration to avoid having garbage values

From: Martin Varghese <hidden>
Date: 2020-06-16 05:49:14

From: Martin <redacted>

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 <redacted>
---
 drivers/net/bareudp.c | 2 ++
 1 file changed, 2 insertions(+)
diff --git a/drivers/net/bareudp.c b/drivers/net/bareudp.c
index efd1a1d..5d3c691 100644
--- a/drivers/net/bareudp.c
+++ b/drivers/net/bareudp.c
@@ -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;
-- 
1.8.3.1

Re: [PATCH net] bareudp: Fixed configuration to avoid having garbage values

From: David Miller <davem@davemloft.net>
Date: 2020-06-16 20:43:31

From: Martin Varghese <redacted>
Date: Tue, 16 Jun 2020 11:18:58 +0530
From: Martin <redacted>

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 <redacted>
Applied, thank you.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help