bareudp: Fixed multiproto mode configuration
authorMartin <martin.varghese@nokia.com>
Wed, 17 Jun 2020 17:00:23 +0000 (22:30 +0530)
committerSasha Levin <sashal@kernel.org>
Tue, 30 Jun 2020 19:35:52 +0000 (15:35 -0400)
[ Upstream commit 4c98045c9b74feab837be58986c0517d3cc661f1 ]

Code to handle multiproto configuration is missing.

Fixes: 4b5f67232d95 ("net: Special handling for IP & MPLS")
Signed-off-by: Martin <martin.varghese@nokia.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/net/bareudp.c

index 5d3c691a1c668835f253f5d36aa850380bd66049..3dd46cd551145e74e80a136f7fac410ce2ffb430 100644 (file)
@@ -572,6 +572,9 @@ static int bareudp2info(struct nlattr *data[], struct bareudp_conf *conf,
        if (data[IFLA_BAREUDP_SRCPORT_MIN])
                conf->sport_min =  nla_get_u16(data[IFLA_BAREUDP_SRCPORT_MIN]);
 
+       if (data[IFLA_BAREUDP_MULTIPROTO_MODE])
+               conf->multi_proto_mode = true;
+
        return 0;
 }