summaryrefslogtreecommitdiffstats
path: root/net/ipv4/fib_frontend.c
diff options
context:
space:
mode:
authorDavid Ahern <dsahern@gmail.com>2017-05-27 16:19:27 -0600
committerDavid S. Miller <davem@davemloft.net>2017-05-30 11:55:31 -0400
commitc255bd681d1a93fff2a2c249d91449cce830ac64 (patch)
tree926aa52879b0b1c3f348e37e599375c0e7a06641 /net/ipv4/fib_frontend.c
parent78055998954b7a3e6c31eb24d1d26f0b63a7ec0d (diff)
downloadlinux-stable-c255bd681d1a93fff2a2c249d91449cce830ac64.tar.gz
linux-stable-c255bd681d1a93fff2a2c249d91449cce830ac64.tar.bz2
linux-stable-c255bd681d1a93fff2a2c249d91449cce830ac64.zip
net: lwtunnel: Add extack to encap attr validation
Pass extack down to lwtunnel_valid_encap_type and lwtunnel_valid_encap_type_attr. Add messages for unknown or unsupported encap types. Signed-off-by: David Ahern <dsahern@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/ipv4/fib_frontend.c')
-rw-r--r--net/ipv4/fib_frontend.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/net/ipv4/fib_frontend.c b/net/ipv4/fib_frontend.c
index 715b7967d8ea..4e678fa892dd 100644
--- a/net/ipv4/fib_frontend.c
+++ b/net/ipv4/fib_frontend.c
@@ -685,7 +685,8 @@ static int rtm_to_fib_config(struct net *net, struct sk_buff *skb,
break;
case RTA_MULTIPATH:
err = lwtunnel_valid_encap_type_attr(nla_data(attr),
- nla_len(attr));
+ nla_len(attr),
+ extack);
if (err < 0)
goto errout;
cfg->fc_mp = nla_data(attr);
@@ -702,7 +703,8 @@ static int rtm_to_fib_config(struct net *net, struct sk_buff *skb,
break;
case RTA_ENCAP_TYPE:
cfg->fc_encap_type = nla_get_u16(attr);
- err = lwtunnel_valid_encap_type(cfg->fc_encap_type);
+ err = lwtunnel_valid_encap_type(cfg->fc_encap_type,
+ extack);
if (err < 0)
goto errout;
break;