diff options
author | David Ahern <dsahern@gmail.com> | 2019-02-26 20:00:04 +0300 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2019-03-10 09:17:19 +0300 |
commit | 4f3221dee1e1230555cbf24c2d5907f470b5e10e (patch) | |
tree | b715f65131d24acfc4045765b2ca6ad416aa8d30 | |
parent | a68d31cc530649a714bd309dde6d12083231a518 (diff) | |
download | linux-4f3221dee1e1230555cbf24c2d5907f470b5e10e.tar.xz |
mpls: Return error for RTA_GATEWAY attribute
[ Upstream commit be48220edd48ca0d569782992840488a52373a24 ]
MPLS does not support nexthops with an MPLS address family.
Specifically, it does not handle RTA_GATEWAY attribute. Make it
clear by returning an error.
Fixes: 03c0566542f4c ("mpls: Netlink commands to add, remove, and dump routes")
Signed-off-by: David Ahern <dsahern@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-rw-r--r-- | net/mpls/af_mpls.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/net/mpls/af_mpls.c b/net/mpls/af_mpls.c index 8fbe6cdbe255..d5a4db5b3fe7 100644 --- a/net/mpls/af_mpls.c +++ b/net/mpls/af_mpls.c @@ -1822,6 +1822,9 @@ static int rtm_to_route_config(struct sk_buff *skb, goto errout; break; } + case RTA_GATEWAY: + NL_SET_ERR_MSG(extack, "MPLS does not support RTA_GATEWAY attribute"); + goto errout; case RTA_VIA: { if (nla_get_via(nla, &cfg->rc_via_alen, |