From: Martin Varghese <martinvarghesenokia@gmail.com>
To: netdev@vger.kernel.org, davem@davemloft.net
Cc: Martin <martin.varghese@nokia.com>
Subject: [PATCH net] bareudp: Fixed configuration to avoid having garbage values
Date: Tue, 16 Jun 2020 11:18:58 +0530 [thread overview]
Message-ID: <1592286538-6895-1-git-send-email-martinvarghesenokia@gmail.com> (raw)
From: Martin <martin.varghese@nokia.com>
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>
---
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
next reply other threads:[~2020-06-16 5:49 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-06-16 5:48 Martin Varghese [this message]
2020-06-16 20:43 ` [PATCH net] bareudp: Fixed configuration to avoid having garbage values David Miller
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1592286538-6895-1-git-send-email-martinvarghesenokia@gmail.com \
--to=martinvarghesenokia@gmail.com \
--cc=davem@davemloft.net \
--cc=martin.varghese@nokia.com \
--cc=netdev@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox