mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-28 18:51:56 -04:00
rtnetlink: Remove passing of attributes into rtnl_doit functions
With decnet converted, we can finally get rid of rta_buf and its computations around it. It also gets rid of the minimal header length verification since all message handlers do that explicitly anyway. Signed-off-by: Thomas Graf <[email protected]> Signed-off-by: David S. Miller <[email protected]>
This commit is contained in:
parent
58d7d8f9b2
commit
661d2967b3
20 changed files with 47 additions and 117 deletions
|
|
@ -544,8 +544,7 @@ static const struct nla_policy devconf_ipv6_policy[NETCONFA_MAX+1] = {
|
|||
};
|
||||
|
||||
static int inet6_netconf_get_devconf(struct sk_buff *in_skb,
|
||||
struct nlmsghdr *nlh,
|
||||
void *arg)
|
||||
struct nlmsghdr *nlh)
|
||||
{
|
||||
struct net *net = sock_net(in_skb->sk);
|
||||
struct nlattr *tb[NETCONFA_MAX+1];
|
||||
|
|
@ -3578,7 +3577,7 @@ static const struct nla_policy ifa_ipv6_policy[IFA_MAX+1] = {
|
|||
};
|
||||
|
||||
static int
|
||||
inet6_rtm_deladdr(struct sk_buff *skb, struct nlmsghdr *nlh, void *arg)
|
||||
inet6_rtm_deladdr(struct sk_buff *skb, struct nlmsghdr *nlh)
|
||||
{
|
||||
struct net *net = sock_net(skb->sk);
|
||||
struct ifaddrmsg *ifm;
|
||||
|
|
@ -3644,7 +3643,7 @@ static int inet6_addr_modify(struct inet6_ifaddr *ifp, u8 ifa_flags,
|
|||
}
|
||||
|
||||
static int
|
||||
inet6_rtm_newaddr(struct sk_buff *skb, struct nlmsghdr *nlh, void *arg)
|
||||
inet6_rtm_newaddr(struct sk_buff *skb, struct nlmsghdr *nlh)
|
||||
{
|
||||
struct net *net = sock_net(skb->sk);
|
||||
struct ifaddrmsg *ifm;
|
||||
|
|
@ -3983,8 +3982,7 @@ static int inet6_dump_ifacaddr(struct sk_buff *skb, struct netlink_callback *cb)
|
|||
return inet6_dump_addr(skb, cb, type);
|
||||
}
|
||||
|
||||
static int inet6_rtm_getaddr(struct sk_buff *in_skb, struct nlmsghdr *nlh,
|
||||
void *arg)
|
||||
static int inet6_rtm_getaddr(struct sk_buff *in_skb, struct nlmsghdr *nlh)
|
||||
{
|
||||
struct net *net = sock_net(in_skb->sk);
|
||||
struct ifaddrmsg *ifm;
|
||||
|
|
|
|||
|
|
@ -414,8 +414,7 @@ static const struct nla_policy ifal_policy[IFAL_MAX+1] = {
|
|||
[IFAL_LABEL] = { .len = sizeof(u32), },
|
||||
};
|
||||
|
||||
static int ip6addrlbl_newdel(struct sk_buff *skb, struct nlmsghdr *nlh,
|
||||
void *arg)
|
||||
static int ip6addrlbl_newdel(struct sk_buff *skb, struct nlmsghdr *nlh)
|
||||
{
|
||||
struct net *net = sock_net(skb->sk);
|
||||
struct ifaddrlblmsg *ifal;
|
||||
|
|
@ -530,8 +529,7 @@ static inline int ip6addrlbl_msgsize(void)
|
|||
+ nla_total_size(4); /* IFAL_LABEL */
|
||||
}
|
||||
|
||||
static int ip6addrlbl_get(struct sk_buff *in_skb, struct nlmsghdr* nlh,
|
||||
void *arg)
|
||||
static int ip6addrlbl_get(struct sk_buff *in_skb, struct nlmsghdr* nlh)
|
||||
{
|
||||
struct net *net = sock_net(in_skb->sk);
|
||||
struct ifaddrlblmsg *ifal;
|
||||
|
|
|
|||
|
|
@ -2355,7 +2355,7 @@ beginning:
|
|||
return last_err;
|
||||
}
|
||||
|
||||
static int inet6_rtm_delroute(struct sk_buff *skb, struct nlmsghdr* nlh, void *arg)
|
||||
static int inet6_rtm_delroute(struct sk_buff *skb, struct nlmsghdr* nlh)
|
||||
{
|
||||
struct fib6_config cfg;
|
||||
int err;
|
||||
|
|
@ -2370,7 +2370,7 @@ static int inet6_rtm_delroute(struct sk_buff *skb, struct nlmsghdr* nlh, void *a
|
|||
return ip6_route_del(&cfg);
|
||||
}
|
||||
|
||||
static int inet6_rtm_newroute(struct sk_buff *skb, struct nlmsghdr* nlh, void *arg)
|
||||
static int inet6_rtm_newroute(struct sk_buff *skb, struct nlmsghdr* nlh)
|
||||
{
|
||||
struct fib6_config cfg;
|
||||
int err;
|
||||
|
|
@ -2562,7 +2562,7 @@ int rt6_dump_route(struct rt6_info *rt, void *p_arg)
|
|||
prefix, 0, NLM_F_MULTI);
|
||||
}
|
||||
|
||||
static int inet6_rtm_getroute(struct sk_buff *in_skb, struct nlmsghdr* nlh, void *arg)
|
||||
static int inet6_rtm_getroute(struct sk_buff *in_skb, struct nlmsghdr* nlh)
|
||||
{
|
||||
struct net *net = sock_net(in_skb->sk);
|
||||
struct nlattr *tb[RTA_MAX+1];
|
||||
|
|
|
|||
Loading…
Reference in a new issue