From: Thomas Graf Date: Tue, 26 Jun 2012 23:36:14 +0000 (+0000) Subject: ip6mr: Do not use RTA_PUT() macros X-Git-Tag: firefly_0821_release~3680^2~2381^2~383 X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=74a0bd7d0ef4ed11345aaebc29bf4578ccf44087;p=firefly-linux-kernel-4.4.55.git ip6mr: Do not use RTA_PUT() macros Signed-off-by: Thomas Graf Signed-off-by: David S. Miller --- diff --git a/net/ipv6/ip6mr.c b/net/ipv6/ip6mr.c index 461e47c8e956..4532973f0dd4 100644 --- a/net/ipv6/ip6mr.c +++ b/net/ipv6/ip6mr.c @@ -2104,8 +2104,9 @@ static int __ip6mr_fill_mroute(struct mr6_table *mrt, struct sk_buff *skb, if (c->mf6c_parent >= MAXMIFS) return -ENOENT; - if (MIF_EXISTS(mrt, c->mf6c_parent)) - RTA_PUT(skb, RTA_IIF, 4, &mrt->vif6_table[c->mf6c_parent].dev->ifindex); + if (MIF_EXISTS(mrt, c->mf6c_parent) && + nla_put_u32(skb, RTA_IIF, mrt->vif6_table[c->mf6c_parent].dev->ifindex) < 0) + return -EMSGSIZE; mp_head = (struct rtattr *)skb_put(skb, RTA_LENGTH(0));