@@ -2213,7 +2213,8 @@ static int do_setlink(const struct sk_buff *skb,
22132213 return err ;
22142214}
22152215
2216- static int rtnl_setlink (struct sk_buff * skb , struct nlmsghdr * nlh )
2216+ static int rtnl_setlink (struct sk_buff * skb , struct nlmsghdr * nlh ,
2217+ struct netlink_ext_ack * extack )
22172218{
22182219 struct net * net = sock_net (skb -> sk );
22192220 struct ifinfomsg * ifm ;
@@ -2222,7 +2223,8 @@ static int rtnl_setlink(struct sk_buff *skb, struct nlmsghdr *nlh)
22222223 struct nlattr * tb [IFLA_MAX + 1 ];
22232224 char ifname [IFNAMSIZ ];
22242225
2225- err = nlmsg_parse (nlh , sizeof (* ifm ), tb , IFLA_MAX , ifla_policy , NULL );
2226+ err = nlmsg_parse (nlh , sizeof (* ifm ), tb , IFLA_MAX , ifla_policy ,
2227+ extack );
22262228 if (err < 0 )
22272229 goto errout ;
22282230
@@ -2306,7 +2308,8 @@ int rtnl_delete_link(struct net_device *dev)
23062308}
23072309EXPORT_SYMBOL_GPL (rtnl_delete_link );
23082310
2309- static int rtnl_dellink (struct sk_buff * skb , struct nlmsghdr * nlh )
2311+ static int rtnl_dellink (struct sk_buff * skb , struct nlmsghdr * nlh ,
2312+ struct netlink_ext_ack * extack )
23102313{
23112314 struct net * net = sock_net (skb -> sk );
23122315 struct net_device * dev ;
@@ -2315,7 +2318,7 @@ static int rtnl_dellink(struct sk_buff *skb, struct nlmsghdr *nlh)
23152318 struct nlattr * tb [IFLA_MAX + 1 ];
23162319 int err ;
23172320
2318- err = nlmsg_parse (nlh , sizeof (* ifm ), tb , IFLA_MAX , ifla_policy , NULL );
2321+ err = nlmsg_parse (nlh , sizeof (* ifm ), tb , IFLA_MAX , ifla_policy , extack );
23192322 if (err < 0 )
23202323 return err ;
23212324
@@ -2426,7 +2429,8 @@ static int rtnl_group_changelink(const struct sk_buff *skb,
24262429 return 0 ;
24272430}
24282431
2429- static int rtnl_newlink (struct sk_buff * skb , struct nlmsghdr * nlh )
2432+ static int rtnl_newlink (struct sk_buff * skb , struct nlmsghdr * nlh ,
2433+ struct netlink_ext_ack * extack )
24302434{
24312435 struct net * net = sock_net (skb -> sk );
24322436 const struct rtnl_link_ops * ops ;
@@ -2444,7 +2448,7 @@ static int rtnl_newlink(struct sk_buff *skb, struct nlmsghdr *nlh)
24442448#ifdef CONFIG_MODULES
24452449replay :
24462450#endif
2447- err = nlmsg_parse (nlh , sizeof (* ifm ), tb , IFLA_MAX , ifla_policy , NULL );
2451+ err = nlmsg_parse (nlh , sizeof (* ifm ), tb , IFLA_MAX , ifla_policy , extack );
24482452 if (err < 0 )
24492453 return err ;
24502454
@@ -2678,7 +2682,8 @@ static int rtnl_newlink(struct sk_buff *skb, struct nlmsghdr *nlh)
26782682 }
26792683}
26802684
2681- static int rtnl_getlink (struct sk_buff * skb , struct nlmsghdr * nlh )
2685+ static int rtnl_getlink (struct sk_buff * skb , struct nlmsghdr * nlh ,
2686+ struct netlink_ext_ack * extack )
26822687{
26832688 struct net * net = sock_net (skb -> sk );
26842689 struct ifinfomsg * ifm ;
@@ -2689,7 +2694,7 @@ static int rtnl_getlink(struct sk_buff *skb, struct nlmsghdr* nlh)
26892694 int err ;
26902695 u32 ext_filter_mask = 0 ;
26912696
2692- err = nlmsg_parse (nlh , sizeof (* ifm ), tb , IFLA_MAX , ifla_policy , NULL );
2697+ err = nlmsg_parse (nlh , sizeof (* ifm ), tb , IFLA_MAX , ifla_policy , extack );
26932698 if (err < 0 )
26942699 return err ;
26952700
@@ -2960,7 +2965,8 @@ static int fdb_vid_parse(struct nlattr *vlan_attr, u16 *p_vid)
29602965 return 0 ;
29612966}
29622967
2963- static int rtnl_fdb_add (struct sk_buff * skb , struct nlmsghdr * nlh )
2968+ static int rtnl_fdb_add (struct sk_buff * skb , struct nlmsghdr * nlh ,
2969+ struct netlink_ext_ack * extack )
29642970{
29652971 struct net * net = sock_net (skb -> sk );
29662972 struct ndmsg * ndm ;
@@ -2970,7 +2976,7 @@ static int rtnl_fdb_add(struct sk_buff *skb, struct nlmsghdr *nlh)
29702976 u16 vid ;
29712977 int err ;
29722978
2973- err = nlmsg_parse (nlh , sizeof (* ndm ), tb , NDA_MAX , NULL , NULL );
2979+ err = nlmsg_parse (nlh , sizeof (* ndm ), tb , NDA_MAX , NULL , extack );
29742980 if (err < 0 )
29752981 return err ;
29762982
@@ -3060,7 +3066,8 @@ int ndo_dflt_fdb_del(struct ndmsg *ndm,
30603066}
30613067EXPORT_SYMBOL (ndo_dflt_fdb_del );
30623068
3063- static int rtnl_fdb_del (struct sk_buff * skb , struct nlmsghdr * nlh )
3069+ static int rtnl_fdb_del (struct sk_buff * skb , struct nlmsghdr * nlh ,
3070+ struct netlink_ext_ack * extack )
30643071{
30653072 struct net * net = sock_net (skb -> sk );
30663073 struct ndmsg * ndm ;
@@ -3073,7 +3080,7 @@ static int rtnl_fdb_del(struct sk_buff *skb, struct nlmsghdr *nlh)
30733080 if (!netlink_capable (skb , CAP_NET_ADMIN ))
30743081 return - EPERM ;
30753082
3076- err = nlmsg_parse (nlh , sizeof (* ndm ), tb , NDA_MAX , NULL , NULL );
3083+ err = nlmsg_parse (nlh , sizeof (* ndm ), tb , NDA_MAX , NULL , extack );
30773084 if (err < 0 )
30783085 return err ;
30793086
@@ -3503,7 +3510,8 @@ static int rtnl_bridge_notify(struct net_device *dev)
35033510 return err ;
35043511}
35053512
3506- static int rtnl_bridge_setlink (struct sk_buff * skb , struct nlmsghdr * nlh )
3513+ static int rtnl_bridge_setlink (struct sk_buff * skb , struct nlmsghdr * nlh ,
3514+ struct netlink_ext_ack * extack )
35073515{
35083516 struct net * net = sock_net (skb -> sk );
35093517 struct ifinfomsg * ifm ;
@@ -3577,7 +3585,8 @@ static int rtnl_bridge_setlink(struct sk_buff *skb, struct nlmsghdr *nlh)
35773585 return err ;
35783586}
35793587
3580- static int rtnl_bridge_dellink (struct sk_buff * skb , struct nlmsghdr * nlh )
3588+ static int rtnl_bridge_dellink (struct sk_buff * skb , struct nlmsghdr * nlh ,
3589+ struct netlink_ext_ack * extack )
35813590{
35823591 struct net * net = sock_net (skb -> sk );
35833592 struct ifinfomsg * ifm ;
@@ -3945,7 +3954,8 @@ static size_t if_nlmsg_stats_size(const struct net_device *dev,
39453954 return size ;
39463955}
39473956
3948- static int rtnl_stats_get (struct sk_buff * skb , struct nlmsghdr * nlh )
3957+ static int rtnl_stats_get (struct sk_buff * skb , struct nlmsghdr * nlh ,
3958+ struct netlink_ext_ack * extack )
39493959{
39503960 struct net * net = sock_net (skb -> sk );
39513961 struct net_device * dev = NULL ;
@@ -4107,7 +4117,7 @@ static int rtnetlink_rcv_msg(struct sk_buff *skb, struct nlmsghdr *nlh,
41074117 if (doit == NULL )
41084118 return - EOPNOTSUPP ;
41094119
4110- return doit (skb , nlh );
4120+ return doit (skb , nlh , extack );
41114121}
41124122
41134123static void rtnetlink_rcv (struct sk_buff * skb )
0 commit comments