Commit b15bb881 authored by Martin's avatar Martin Committed by David S. Miller

bareudp: Fixed configuration to avoid having garbage values

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

Fixes: 571912c6 ("net: UDP tunnel encapsulation module for tunnelling different protocols like MPLS, IP, NSH etc.")
Signed-off-by: default avatarMartin <martin.varghese@nokia.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 807eaf99
...@@ -552,6 +552,8 @@ static int bareudp_validate(struct nlattr *tb[], struct nlattr *data[], ...@@ -552,6 +552,8 @@ static int bareudp_validate(struct nlattr *tb[], struct nlattr *data[],
static int bareudp2info(struct nlattr *data[], struct bareudp_conf *conf, static int bareudp2info(struct nlattr *data[], struct bareudp_conf *conf,
struct netlink_ext_ack *extack) struct netlink_ext_ack *extack)
{ {
memset(conf, 0, sizeof(*conf));
if (!data[IFLA_BAREUDP_PORT]) { if (!data[IFLA_BAREUDP_PORT]) {
NL_SET_ERR_MSG(extack, "port not specified"); NL_SET_ERR_MSG(extack, "port not specified");
return -EINVAL; return -EINVAL;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment