aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMatthias Schiffer <mschiffer@universe-factory.net>2017-06-25 17:56:01 -0400
committerDavid S. Miller <davem@davemloft.net>2017-06-26 23:13:22 -0400
commita8b8a889e369de82f295f55455adb4a7c31c458c (patch)
tree102e9d3c011ac2f5fdc8992107c1124067684c02
parentad744b223c521b1e01752a826774545c3e3acd8e (diff)
net: add netlink_ext_ack argument to rtnl_link_ops.validate
Add support for extended error reporting. Signed-off-by: Matthias Schiffer <mschiffer@universe-factory.net> Acked-by: David Ahern <dsahern@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
-rw-r--r--drivers/net/bonding/bond_netlink.c3
-rw-r--r--drivers/net/can/dev.c3
-rw-r--r--drivers/net/dummy.c3
-rw-r--r--drivers/net/geneve.c3
-rw-r--r--drivers/net/gtp.c3
-rw-r--r--drivers/net/ifb.c3
-rw-r--r--drivers/net/ipvlan/ipvlan_main.c3
-rw-r--r--drivers/net/macsec.c3
-rw-r--r--drivers/net/macvlan.c3
-rw-r--r--drivers/net/nlmon.c3
-rw-r--r--drivers/net/ppp/ppp_generic.c3
-rw-r--r--drivers/net/team/team.c3
-rw-r--r--drivers/net/tun.c3
-rw-r--r--drivers/net/veth.c5
-rw-r--r--drivers/net/vrf.c3
-rw-r--r--drivers/net/vxlan.c3
-rw-r--r--include/net/rtnetlink.h3
-rw-r--r--net/8021q/vlan_netlink.c3
-rw-r--r--net/bridge/br_netlink.c4
-rw-r--r--net/core/rtnetlink.c2
-rw-r--r--net/ieee802154/6lowpan/core.c3
-rw-r--r--net/ipv4/ip_gre.c8
-rw-r--r--net/ipv4/ip_vti.c3
-rw-r--r--net/ipv4/ipip.c3
-rw-r--r--net/ipv6/ip6_gre.c8
-rw-r--r--net/ipv6/ip6_tunnel.c3
-rw-r--r--net/ipv6/ip6_vti.c3
-rw-r--r--net/ipv6/sit.c3
28 files changed, 63 insertions, 33 deletions
diff --git a/drivers/net/bonding/bond_netlink.c b/drivers/net/bonding/bond_netlink.c
index cb803c026f1f..0a9d78de6138 100644
--- a/drivers/net/bonding/bond_netlink.c
+++ b/drivers/net/bonding/bond_netlink.c
@@ -118,7 +118,8 @@ static const struct nla_policy bond_slave_policy[IFLA_BOND_SLAVE_MAX + 1] = {
118 [IFLA_BOND_SLAVE_QUEUE_ID] = { .type = NLA_U16 }, 118 [IFLA_BOND_SLAVE_QUEUE_ID] = { .type = NLA_U16 },
119}; 119};
120 120
121static int bond_validate(struct nlattr *tb[], struct nlattr *data[]) 121static int bond_validate(struct nlattr *tb[], struct nlattr *data[],
122 struct netlink_ext_ack *extack)
122{ 123{
123 if (tb[IFLA_ADDRESS]) { 124 if (tb[IFLA_ADDRESS]) {
124 if (nla_len(tb[IFLA_ADDRESS]) != ETH_ALEN) 125 if (nla_len(tb[IFLA_ADDRESS]) != ETH_ALEN)
diff --git a/drivers/net/can/dev.c b/drivers/net/can/dev.c
index 6d8191f2ad32..365a8cc62405 100644
--- a/drivers/net/can/dev.c
+++ b/drivers/net/can/dev.c
@@ -848,7 +848,8 @@ static const struct nla_policy can_policy[IFLA_CAN_MAX + 1] = {
848 = { .len = sizeof(struct can_bittiming_const) }, 848 = { .len = sizeof(struct can_bittiming_const) },
849}; 849};
850 850
851static int can_validate(struct nlattr *tb[], struct nlattr *data[]) 851static int can_validate(struct nlattr *tb[], struct nlattr *data[],
852 struct netlink_ext_ack *extack)
852{ 853{
853 bool is_can_fd = false; 854 bool is_can_fd = false;
854 855
diff --git a/drivers/net/dummy.c b/drivers/net/dummy.c
index 9905b52fe293..d0c165d2086e 100644
--- a/drivers/net/dummy.c
+++ b/drivers/net/dummy.c
@@ -356,7 +356,8 @@ static void dummy_setup(struct net_device *dev)
356 dev->max_mtu = ETH_MAX_MTU; 356 dev->max_mtu = ETH_MAX_MTU;
357} 357}
358 358
359static int dummy_validate(struct nlattr *tb[], struct nlattr *data[]) 359static int dummy_validate(struct nlattr *tb[], struct nlattr *data[],
360 struct netlink_ext_ack *extack)
360{ 361{
361 if (tb[IFLA_ADDRESS]) { 362 if (tb[IFLA_ADDRESS]) {
362 if (nla_len(tb[IFLA_ADDRESS]) != ETH_ALEN) 363 if (nla_len(tb[IFLA_ADDRESS]) != ETH_ALEN)
diff --git a/drivers/net/geneve.c b/drivers/net/geneve.c
index 0a72d914e1f9..eb77201cb718 100644
--- a/drivers/net/geneve.c
+++ b/drivers/net/geneve.c
@@ -1058,7 +1058,8 @@ static const struct nla_policy geneve_policy[IFLA_GENEVE_MAX + 1] = {
1058 [IFLA_GENEVE_UDP_ZERO_CSUM6_RX] = { .type = NLA_U8 }, 1058 [IFLA_GENEVE_UDP_ZERO_CSUM6_RX] = { .type = NLA_U8 },
1059}; 1059};
1060 1060
1061static int geneve_validate(struct nlattr *tb[], struct nlattr *data[]) 1061static int geneve_validate(struct nlattr *tb[], struct nlattr *data[],
1062 struct netlink_ext_ack *extack)
1062{ 1063{
1063 if (tb[IFLA_ADDRESS]) { 1064 if (tb[IFLA_ADDRESS]) {
1064 if (nla_len(tb[IFLA_ADDRESS]) != ETH_ALEN) 1065 if (nla_len(tb[IFLA_ADDRESS]) != ETH_ALEN)
diff --git a/drivers/net/gtp.c b/drivers/net/gtp.c
index 9cfe8a24c1fc..1542e837fdfa 100644
--- a/drivers/net/gtp.c
+++ b/drivers/net/gtp.c
@@ -698,7 +698,8 @@ static const struct nla_policy gtp_policy[IFLA_GTP_MAX + 1] = {
698 [IFLA_GTP_ROLE] = { .type = NLA_U32 }, 698 [IFLA_GTP_ROLE] = { .type = NLA_U32 },
699}; 699};
700 700
701static int gtp_validate(struct nlattr *tb[], struct nlattr *data[]) 701static int gtp_validate(struct nlattr *tb[], struct nlattr *data[],
702 struct netlink_ext_ack *extack)
702{ 703{
703 if (!data) 704 if (!data)
704 return -EINVAL; 705 return -EINVAL;
diff --git a/drivers/net/ifb.c b/drivers/net/ifb.c
index 144ea5ae8ab4..8870bd2a2e8a 100644
--- a/drivers/net/ifb.c
+++ b/drivers/net/ifb.c
@@ -273,7 +273,8 @@ static int ifb_open(struct net_device *dev)
273 return 0; 273 return 0;
274} 274}
275 275
276static int ifb_validate(struct nlattr *tb[], struct nlattr *data[]) 276static int ifb_validate(struct nlattr *tb[], struct nlattr *data[],
277 struct netlink_ext_ack *extack)
277{ 278{
278 if (tb[IFLA_ADDRESS]) { 279 if (tb[IFLA_ADDRESS]) {
279 if (nla_len(tb[IFLA_ADDRESS]) != ETH_ALEN) 280 if (nla_len(tb[IFLA_ADDRESS]) != ETH_ALEN)
diff --git a/drivers/net/ipvlan/ipvlan_main.c b/drivers/net/ipvlan/ipvlan_main.c
index e7d54072d7b3..f37e3c1fd4e7 100644
--- a/drivers/net/ipvlan/ipvlan_main.c
+++ b/drivers/net/ipvlan/ipvlan_main.c
@@ -477,7 +477,8 @@ static size_t ipvlan_nl_getsize(const struct net_device *dev)
477 ); 477 );
478} 478}
479 479
480static int ipvlan_nl_validate(struct nlattr *tb[], struct nlattr *data[]) 480static int ipvlan_nl_validate(struct nlattr *tb[], struct nlattr *data[],
481 struct netlink_ext_ack *extack)
481{ 482{
482 if (data && data[IFLA_IPVLAN_MODE]) { 483 if (data && data[IFLA_IPVLAN_MODE]) {
483 u16 mode = nla_get_u16(data[IFLA_IPVLAN_MODE]); 484 u16 mode = nla_get_u16(data[IFLA_IPVLAN_MODE]);
diff --git a/drivers/net/macsec.c b/drivers/net/macsec.c
index 38ba3d73ac15..5e1ab1160856 100644
--- a/drivers/net/macsec.c
+++ b/drivers/net/macsec.c
@@ -3287,7 +3287,8 @@ unregister:
3287 return err; 3287 return err;
3288} 3288}
3289 3289
3290static int macsec_validate_attr(struct nlattr *tb[], struct nlattr *data[]) 3290static int macsec_validate_attr(struct nlattr *tb[], struct nlattr *data[],
3291 struct netlink_ext_ack *extack)
3291{ 3292{
3292 u64 csid = MACSEC_DEFAULT_CIPHER_ID; 3293 u64 csid = MACSEC_DEFAULT_CIPHER_ID;
3293 u8 icv_len = DEFAULT_ICV_LEN; 3294 u8 icv_len = DEFAULT_ICV_LEN;
diff --git a/drivers/net/macvlan.c b/drivers/net/macvlan.c
index 3064416578a9..9ffff0362a11 100644
--- a/drivers/net/macvlan.c
+++ b/drivers/net/macvlan.c
@@ -1162,7 +1162,8 @@ static void macvlan_port_destroy(struct net_device *dev)
1162 kfree(port); 1162 kfree(port);
1163} 1163}
1164 1164
1165static int macvlan_validate(struct nlattr *tb[], struct nlattr *data[]) 1165static int macvlan_validate(struct nlattr *tb[], struct nlattr *data[],
1166 struct netlink_ext_ack *extack)
1166{ 1167{
1167 if (tb[IFLA_ADDRESS]) { 1168 if (tb[IFLA_ADDRESS]) {
1168 if (nla_len(tb[IFLA_ADDRESS]) != ETH_ALEN) 1169 if (nla_len(tb[IFLA_ADDRESS]) != ETH_ALEN)
diff --git a/drivers/net/nlmon.c b/drivers/net/nlmon.c
index c4b3362da4a2..4b22955de191 100644
--- a/drivers/net/nlmon.c
+++ b/drivers/net/nlmon.c
@@ -127,7 +127,8 @@ static void nlmon_setup(struct net_device *dev)
127 dev->min_mtu = sizeof(struct nlmsghdr); 127 dev->min_mtu = sizeof(struct nlmsghdr);
128} 128}
129 129
130static int nlmon_validate(struct nlattr *tb[], struct nlattr *data[]) 130static int nlmon_validate(struct nlattr *tb[], struct nlattr *data[],
131 struct netlink_ext_ack *extack)
131{ 132{
132 if (tb[IFLA_ADDRESS]) 133 if (tb[IFLA_ADDRESS])
133 return -EINVAL; 134 return -EINVAL;
diff --git a/drivers/net/ppp/ppp_generic.c b/drivers/net/ppp/ppp_generic.c
index 8479c130fe2e..13028833bee3 100644
--- a/drivers/net/ppp/ppp_generic.c
+++ b/drivers/net/ppp/ppp_generic.c
@@ -1061,7 +1061,8 @@ static const struct nla_policy ppp_nl_policy[IFLA_PPP_MAX + 1] = {
1061 [IFLA_PPP_DEV_FD] = { .type = NLA_S32 }, 1061 [IFLA_PPP_DEV_FD] = { .type = NLA_S32 },
1062}; 1062};
1063 1063
1064static int ppp_nl_validate(struct nlattr *tb[], struct nlattr *data[]) 1064static int ppp_nl_validate(struct nlattr *tb[], struct nlattr *data[],
1065 struct netlink_ext_ack *extack)
1065{ 1066{
1066 if (!data) 1067 if (!data)
1067 return -EINVAL; 1068 return -EINVAL;
diff --git a/drivers/net/team/team.c b/drivers/net/team/team.c
index bbe97bb7c9cc..464570409796 100644
--- a/drivers/net/team/team.c
+++ b/drivers/net/team/team.c
@@ -2110,7 +2110,8 @@ static int team_newlink(struct net *src_net, struct net_device *dev,
2110 return register_netdevice(dev); 2110 return register_netdevice(dev);
2111} 2111}
2112 2112
2113static int team_validate(struct nlattr *tb[], struct nlattr *data[]) 2113static int team_validate(struct nlattr *tb[], struct nlattr *data[],
2114 struct netlink_ext_ack *extack)
2114{ 2115{
2115 if (tb[IFLA_ADDRESS]) { 2116 if (tb[IFLA_ADDRESS]) {
2116 if (nla_len(tb[IFLA_ADDRESS]) != ETH_ALEN) 2117 if (nla_len(tb[IFLA_ADDRESS]) != ETH_ALEN)
diff --git a/drivers/net/tun.c b/drivers/net/tun.c
index ae49f4b99b67..3d4c24572ecd 100644
--- a/drivers/net/tun.c
+++ b/drivers/net/tun.c
@@ -1580,7 +1580,8 @@ static void tun_setup(struct net_device *dev)
1580/* Trivial set of netlink ops to allow deleting tun or tap 1580/* Trivial set of netlink ops to allow deleting tun or tap
1581 * device with netlink. 1581 * device with netlink.
1582 */ 1582 */
1583static int tun_validate(struct nlattr *tb[], struct nlattr *data[]) 1583static int tun_validate(struct nlattr *tb[], struct nlattr *data[],
1584 struct netlink_ext_ack *extack)
1584{ 1585{
1585 return -EINVAL; 1586 return -EINVAL;
1586} 1587}
diff --git a/drivers/net/veth.c b/drivers/net/veth.c
index 3db907cb7d07..b33553b1e19c 100644
--- a/drivers/net/veth.c
+++ b/drivers/net/veth.c
@@ -329,7 +329,8 @@ static void veth_setup(struct net_device *dev)
329 * netlink interface 329 * netlink interface
330 */ 330 */
331 331
332static int veth_validate(struct nlattr *tb[], struct nlattr *data[]) 332static int veth_validate(struct nlattr *tb[], struct nlattr *data[],
333 struct netlink_ext_ack *extack)
333{ 334{
334 if (tb[IFLA_ADDRESS]) { 335 if (tb[IFLA_ADDRESS]) {
335 if (nla_len(tb[IFLA_ADDRESS]) != ETH_ALEN) 336 if (nla_len(tb[IFLA_ADDRESS]) != ETH_ALEN)
@@ -374,7 +375,7 @@ static int veth_newlink(struct net *src_net, struct net_device *dev,
374 if (err < 0) 375 if (err < 0)
375 return err; 376 return err;
376 377
377 err = veth_validate(peer_tb, NULL); 378 err = veth_validate(peer_tb, NULL, extack);
378 if (err < 0) 379 if (err < 0)
379 return err; 380 return err;
380 381
diff --git a/drivers/net/vrf.c b/drivers/net/vrf.c
index 762f4d033e1b..f4d0054981c6 100644
--- a/drivers/net/vrf.c
+++ b/drivers/net/vrf.c
@@ -1372,7 +1372,8 @@ static void vrf_setup(struct net_device *dev)
1372 dev->priv_flags |= IFF_NO_QUEUE; 1372 dev->priv_flags |= IFF_NO_QUEUE;
1373} 1373}
1374 1374
1375static int vrf_validate(struct nlattr *tb[], struct nlattr *data[]) 1375static int vrf_validate(struct nlattr *tb[], struct nlattr *data[],
1376 struct netlink_ext_ack *extack)
1376{ 1377{
1377 if (tb[IFLA_ADDRESS]) { 1378 if (tb[IFLA_ADDRESS]) {
1378 if (nla_len(tb[IFLA_ADDRESS]) != ETH_ALEN) 1379 if (nla_len(tb[IFLA_ADDRESS]) != ETH_ALEN)
diff --git a/drivers/net/vxlan.c b/drivers/net/vxlan.c
index 60c40349e73e..0dafd8e6c665 100644
--- a/drivers/net/vxlan.c
+++ b/drivers/net/vxlan.c
@@ -2711,7 +2711,8 @@ static const struct nla_policy vxlan_policy[IFLA_VXLAN_MAX + 1] = {
2711 [IFLA_VXLAN_REMCSUM_NOPARTIAL] = { .type = NLA_FLAG }, 2711 [IFLA_VXLAN_REMCSUM_NOPARTIAL] = { .type = NLA_FLAG },
2712}; 2712};
2713 2713
2714static int vxlan_validate(struct nlattr *tb[], struct nlattr *data[]) 2714static int vxlan_validate(struct nlattr *tb[], struct nlattr *data[],
2715 struct netlink_ext_ack *extack)
2715{ 2716{
2716 if (tb[IFLA_ADDRESS]) { 2717 if (tb[IFLA_ADDRESS]) {
2717 if (nla_len(tb[IFLA_ADDRESS]) != ETH_ALEN) { 2718 if (nla_len(tb[IFLA_ADDRESS]) != ETH_ALEN) {
diff --git a/include/net/rtnetlink.h b/include/net/rtnetlink.h
index f7d0320f75b0..11fe0ad60e43 100644
--- a/include/net/rtnetlink.h
+++ b/include/net/rtnetlink.h
@@ -63,7 +63,8 @@ struct rtnl_link_ops {
63 int maxtype; 63 int maxtype;
64 const struct nla_policy *policy; 64 const struct nla_policy *policy;
65 int (*validate)(struct nlattr *tb[], 65 int (*validate)(struct nlattr *tb[],
66 struct nlattr *data[]); 66 struct nlattr *data[],
67 struct netlink_ext_ack *extack);
67 68
68 int (*newlink)(struct net *src_net, 69 int (*newlink)(struct net *src_net,
69 struct net_device *dev, 70 struct net_device *dev,
diff --git a/net/8021q/vlan_netlink.c b/net/8021q/vlan_netlink.c
index f08b5e192e45..5e831de3103e 100644
--- a/net/8021q/vlan_netlink.c
+++ b/net/8021q/vlan_netlink.c
@@ -39,7 +39,8 @@ static inline int vlan_validate_qos_map(struct nlattr *attr)
39 NULL); 39 NULL);
40} 40}
41 41
42static int vlan_validate(struct nlattr *tb[], struct nlattr *data[]) 42static int vlan_validate(struct nlattr *tb[], struct nlattr *data[],
43 struct netlink_ext_ack *extack)
43{ 44{
44 struct ifla_vlan_flags *flags; 45 struct ifla_vlan_flags *flags;
45 u16 id; 46 u16 id;
diff --git a/net/bridge/br_netlink.c b/net/bridge/br_netlink.c
index 37e4ec2953b2..9af177ca4d31 100644
--- a/net/bridge/br_netlink.c
+++ b/net/bridge/br_netlink.c
@@ -858,7 +858,9 @@ int br_dellink(struct net_device *dev, struct nlmsghdr *nlh, u16 flags)
858 858
859 return err; 859 return err;
860} 860}
861static int br_validate(struct nlattr *tb[], struct nlattr *data[]) 861
862static int br_validate(struct nlattr *tb[], struct nlattr *data[],
863 struct netlink_ext_ack *extack)
862{ 864{
863 if (tb[IFLA_ADDRESS]) { 865 if (tb[IFLA_ADDRESS]) {
864 if (nla_len(tb[IFLA_ADDRESS]) != ETH_ALEN) 866 if (nla_len(tb[IFLA_ADDRESS]) != ETH_ALEN)
diff --git a/net/core/rtnetlink.c b/net/core/rtnetlink.c
index bac81d1bb24d..7136588e65e9 100644
--- a/net/core/rtnetlink.c
+++ b/net/core/rtnetlink.c
@@ -2582,7 +2582,7 @@ replay:
2582 data = attr; 2582 data = attr;
2583 } 2583 }
2584 if (ops->validate) { 2584 if (ops->validate) {
2585 err = ops->validate(tb, data); 2585 err = ops->validate(tb, data, extack);
2586 if (err < 0) 2586 if (err < 0)
2587 return err; 2587 return err;
2588 } 2588 }
diff --git a/net/ieee802154/6lowpan/core.c b/net/ieee802154/6lowpan/core.c
index 1a4c585f3950..de2661cd0328 100644
--- a/net/ieee802154/6lowpan/core.c
+++ b/net/ieee802154/6lowpan/core.c
@@ -111,7 +111,8 @@ static void lowpan_setup(struct net_device *ldev)
111 ldev->features |= NETIF_F_NETNS_LOCAL; 111 ldev->features |= NETIF_F_NETNS_LOCAL;
112} 112}
113 113
114static int lowpan_validate(struct nlattr *tb[], struct nlattr *data[]) 114static int lowpan_validate(struct nlattr *tb[], struct nlattr *data[],
115 struct netlink_ext_ack *extack)
115{ 116{
116 if (tb[IFLA_ADDRESS]) { 117 if (tb[IFLA_ADDRESS]) {
117 if (nla_len(tb[IFLA_ADDRESS]) != IEEE802154_ADDR_LEN) 118 if (nla_len(tb[IFLA_ADDRESS]) != IEEE802154_ADDR_LEN)
diff --git a/net/ipv4/ip_gre.c b/net/ipv4/ip_gre.c
index a63985c4bec7..7a7829e839c2 100644
--- a/net/ipv4/ip_gre.c
+++ b/net/ipv4/ip_gre.c
@@ -779,7 +779,8 @@ static struct pernet_operations ipgre_net_ops = {
779 .size = sizeof(struct ip_tunnel_net), 779 .size = sizeof(struct ip_tunnel_net),
780}; 780};
781 781
782static int ipgre_tunnel_validate(struct nlattr *tb[], struct nlattr *data[]) 782static int ipgre_tunnel_validate(struct nlattr *tb[], struct nlattr *data[],
783 struct netlink_ext_ack *extack)
783{ 784{
784 __be16 flags; 785 __be16 flags;
785 786
@@ -802,7 +803,8 @@ static int ipgre_tunnel_validate(struct nlattr *tb[], struct nlattr *data[])
802 return 0; 803 return 0;
803} 804}
804 805
805static int ipgre_tap_validate(struct nlattr *tb[], struct nlattr *data[]) 806static int ipgre_tap_validate(struct nlattr *tb[], struct nlattr *data[],
807 struct netlink_ext_ack *extack)
806{ 808{
807 __be32 daddr; 809 __be32 daddr;
808 810
@@ -823,7 +825,7 @@ static int ipgre_tap_validate(struct nlattr *tb[], struct nlattr *data[])
823 } 825 }
824 826
825out: 827out:
826 return ipgre_tunnel_validate(tb, data); 828 return ipgre_tunnel_validate(tb, data, extack);
827} 829}
828 830
829static int ipgre_netlink_parms(struct net_device *dev, 831static int ipgre_netlink_parms(struct net_device *dev,
diff --git a/net/ipv4/ip_vti.c b/net/ipv4/ip_vti.c
index 24acff67a4f2..0192c255e508 100644
--- a/net/ipv4/ip_vti.c
+++ b/net/ipv4/ip_vti.c
@@ -465,7 +465,8 @@ static struct pernet_operations vti_net_ops = {
465 .size = sizeof(struct ip_tunnel_net), 465 .size = sizeof(struct ip_tunnel_net),
466}; 466};
467 467
468static int vti_tunnel_validate(struct nlattr *tb[], struct nlattr *data[]) 468static int vti_tunnel_validate(struct nlattr *tb[], struct nlattr *data[],
469 struct netlink_ext_ack *extack)
469{ 470{
470 return 0; 471 return 0;
471} 472}
diff --git a/net/ipv4/ipip.c b/net/ipv4/ipip.c
index eb7fe7b0046f..fb1ad22b5e29 100644
--- a/net/ipv4/ipip.c
+++ b/net/ipv4/ipip.c
@@ -375,7 +375,8 @@ static int ipip_tunnel_init(struct net_device *dev)
375 return ip_tunnel_init(dev); 375 return ip_tunnel_init(dev);
376} 376}
377 377
378static int ipip_tunnel_validate(struct nlattr *tb[], struct nlattr *data[]) 378static int ipip_tunnel_validate(struct nlattr *tb[], struct nlattr *data[],
379 struct netlink_ext_ack *extack)
379{ 380{
380 u8 proto; 381 u8 proto;
381 382
diff --git a/net/ipv6/ip6_gre.c b/net/ipv6/ip6_gre.c
index 7232b28425f3..67ff2aaf5dcb 100644
--- a/net/ipv6/ip6_gre.c
+++ b/net/ipv6/ip6_gre.c
@@ -1170,7 +1170,8 @@ static struct pernet_operations ip6gre_net_ops = {
1170 .size = sizeof(struct ip6gre_net), 1170 .size = sizeof(struct ip6gre_net),
1171}; 1171};
1172 1172
1173static int ip6gre_tunnel_validate(struct nlattr *tb[], struct nlattr *data[]) 1173static int ip6gre_tunnel_validate(struct nlattr *tb[], struct nlattr *data[],
1174 struct netlink_ext_ack *extack)
1174{ 1175{
1175 __be16 flags; 1176 __be16 flags;
1176 1177
@@ -1188,7 +1189,8 @@ static int ip6gre_tunnel_validate(struct nlattr *tb[], struct nlattr *data[])
1188 return 0; 1189 return 0;
1189} 1190}
1190 1191
1191static int ip6gre_tap_validate(struct nlattr *tb[], struct nlattr *data[]) 1192static int ip6gre_tap_validate(struct nlattr *tb[], struct nlattr *data[],
1193 struct netlink_ext_ack *extack)
1192{ 1194{
1193 struct in6_addr daddr; 1195 struct in6_addr daddr;
1194 1196
@@ -1209,7 +1211,7 @@ static int ip6gre_tap_validate(struct nlattr *tb[], struct nlattr *data[])
1209 } 1211 }
1210 1212
1211out: 1213out:
1212 return ip6gre_tunnel_validate(tb, data); 1214 return ip6gre_tunnel_validate(tb, data, extack);
1213} 1215}
1214 1216
1215 1217
diff --git a/net/ipv6/ip6_tunnel.c b/net/ipv6/ip6_tunnel.c
index d9f60a173107..3a0ba2ae4b0f 100644
--- a/net/ipv6/ip6_tunnel.c
+++ b/net/ipv6/ip6_tunnel.c
@@ -1885,7 +1885,8 @@ static int __net_init ip6_fb_tnl_dev_init(struct net_device *dev)
1885 return 0; 1885 return 0;
1886} 1886}
1887 1887
1888static int ip6_tnl_validate(struct nlattr *tb[], struct nlattr *data[]) 1888static int ip6_tnl_validate(struct nlattr *tb[], struct nlattr *data[],
1889 struct netlink_ext_ack *extack)
1889{ 1890{
1890 u8 proto; 1891 u8 proto;
1891 1892
diff --git a/net/ipv6/ip6_vti.c b/net/ipv6/ip6_vti.c
index 2afdddb48e69..486c2305f53c 100644
--- a/net/ipv6/ip6_vti.c
+++ b/net/ipv6/ip6_vti.c
@@ -907,7 +907,8 @@ static int __net_init vti6_fb_tnl_dev_init(struct net_device *dev)
907 return 0; 907 return 0;
908} 908}
909 909
910static int vti6_validate(struct nlattr *tb[], struct nlattr *data[]) 910static int vti6_validate(struct nlattr *tb[], struct nlattr *data[],
911 struct netlink_ext_ack *extack)
911{ 912{
912 return 0; 913 return 0;
913} 914}
diff --git a/net/ipv6/sit.c b/net/ipv6/sit.c
index b8000429f78d..e9958b1398cb 100644
--- a/net/ipv6/sit.c
+++ b/net/ipv6/sit.c
@@ -1406,7 +1406,8 @@ static void __net_init ipip6_fb_tunnel_init(struct net_device *dev)
1406 rcu_assign_pointer(sitn->tunnels_wc[0], tunnel); 1406 rcu_assign_pointer(sitn->tunnels_wc[0], tunnel);
1407} 1407}
1408 1408
1409static int ipip6_validate(struct nlattr *tb[], struct nlattr *data[]) 1409static int ipip6_validate(struct nlattr *tb[], struct nlattr *data[],
1410 struct netlink_ext_ack *extack)
1410{ 1411{
1411 u8 proto; 1412 u8 proto;
1412 1413