summaryrefslogtreecommitdiff
path: root/drivers/net/bareudp.c
diff options
context:
space:
mode:
authorMartin <martin.varghese@nokia.com>2020-06-16 11:18:58 +0530
committerDavid S. Miller <davem@davemloft.net>2020-06-16 13:42:41 -0700
commitb15bb8817f991497d97ae55d8c0e349a9d1e1478 (patch)
tree8ebdafdfbabe37ec6e8cbdcea3da87f832388664 /drivers/net/bareudp.c
parent807eaf99688ce162a98a7501477644782d4af098 (diff)
downloadlinux-next-b15bb8817f991497d97ae55d8c0e349a9d1e1478.tar.gz
bareudp: Fixed configuration to avoid having garbage values
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>
Diffstat (limited to 'drivers/net/bareudp.c')
-rw-r--r--drivers/net/bareudp.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/net/bareudp.c b/drivers/net/bareudp.c
index efd1a1d1f35e..5d3c691a1c66 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;