Re: [PATCH 1/3] Phonet: Netlink factorization and cleanup | |
| [Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] | |
Em Wed, Sep 24, 2008 at 07:11:38PM +0300, Remi Denis-Courmont escreveu:
> From: Rémi Denis-Courmont <remi.denis-courmont@xxxxxxxxx>
>
> Signed-off-by: Rémi Denis-Courmont <remi.denis-courmont@xxxxxxxxx>
> ---
> net/phonet/pn_netlink.c | 91 ++++++++++++++++++-----------------------------
> 1 files changed, 35 insertions(+), 56 deletions(-)
>
> diff --git a/net/phonet/pn_netlink.c b/net/phonet/pn_netlink.c
> index b1ea19a..b1770d6 100644
> --- a/net/phonet/pn_netlink.c
> +++ b/net/phonet/pn_netlink.c
> @@ -54,11 +54,16 @@ errout:
> rtnl_set_sk_err(dev_net(dev), RTNLGRP_PHONET_IFADDR, err);
> }
>
> -static int newaddr_doit(struct sk_buff *skb, struct nlmsghdr *nlm, void *attr)
> +static const struct nla_policy ifa_phonet_policy[IFA_MAX+1] = {
since you are changing the above line, please use [IFA_MAX + 1] for consistency
> + [IFA_LOCAL] = { .type = NLA_U8 },
> +};
> +
> +static int addr_doit(struct sk_buff *skb, struct nlmsghdr *nlh, void *attr)
> {
> - struct rtattr **rta = attr;
> - struct ifaddrmsg *ifm = NLMSG_DATA(nlm);
> + struct net *net = sock_net(skb->sk);
> + struct nlattr *tb[IFA_MAX+1];
Ditto
> struct net_device *dev;
> + struct ifaddrmsg *ifm;
> int err;
> u8 pnaddr;
>
> @@ -67,52 +72,28 @@ static int newaddr_doit(struct sk_buff *skb, struct nlmsghdr *nlm, void *attr)
>
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
[Kernel List] [Site Home] [Ethernet Bridging] [Git] [IETF Annouce] [Linux Assembly] [VLAN] [Networking] [Security] [Bugtraq] [Rubini] [Photo] [Singles Social Netowrking] [Yosemite] [MIPS Linux] [ARM Linux] [Linux Virtualization] [Linux Security] [Linux IDE] [Linux RAID] [Linux SCSI] [Linux Wireless] [DDR & Rambus] [Free Dating] [Linux Resources] [Wireless Reading Device]
![]() |
![]() |