X-Git-Url: http://pileus.org/git/?a=blobdiff_plain;ds=sidebyside;f=net%2Fphonet%2Fpn_netlink.c;h=cfdf135fcd69332e9cb497315f9b6beb39097126;hb=8e95a53ba4b060e2d0d46575059ae96ea91a80fd;hp=d61f6761777de54b547c5634853a0a3d7630765e;hpb=0b576372e86c8e6bee01506651b21ec0fe8a1698;p=~andy%2Flinux diff --git a/net/phonet/pn_netlink.c b/net/phonet/pn_netlink.c index d61f6761777..cfdf135fcd6 100644 --- a/net/phonet/pn_netlink.c +++ b/net/phonet/pn_netlink.c @@ -116,7 +116,8 @@ static int fill_addr(struct sk_buff *skb, struct net_device *dev, u8 addr, ifm->ifa_flags = IFA_F_PERMANENT; ifm->ifa_scope = RT_SCOPE_LINK; ifm->ifa_index = dev->ifindex; - NLA_PUT_U8(skb, IFA_LOCAL, addr); + if (nla_put_u8(skb, IFA_LOCAL, addr)) + goto nla_put_failure; return nlmsg_end(skb, nlh); nla_put_failure: @@ -183,8 +184,9 @@ static int fill_route(struct sk_buff *skb, struct net_device *dev, u8 dst, rtm->rtm_scope = RT_SCOPE_UNIVERSE; rtm->rtm_type = RTN_UNICAST; rtm->rtm_flags = 0; - NLA_PUT_U8(skb, RTA_DST, dst); - NLA_PUT_U32(skb, RTA_OIF, dev->ifindex); + if (nla_put_u8(skb, RTA_DST, dst) || + nla_put_u32(skb, RTA_OIF, dev->ifindex)) + goto nla_put_failure; return nlmsg_end(skb, nlh); nla_put_failure: