All of lore.kernel.org
 help / color / mirror / Atom feed
From: Thomas Graf <tgraf@suug.ch>
To: davem@davemloft.net
Cc: netdev@vger.kernel.org
Subject: [PATCH 5/7] ip6mr: Do not use RTA_PUT() macros
Date: Wed, 27 Jun 2012 11:36:14 +0200	[thread overview]
Message-ID: <f67d0d7010ae44db3c594468b15834dcfc63191f.1340788373.git.tgraf@suug.ch> (raw)
In-Reply-To: <cover.1340788373.git.tgraf@suug.ch>
In-Reply-To: <cover.1340788373.git.tgraf@suug.ch>

Signed-off-by: Thomas Graf <tgraf@suug.ch>
---
 net/ipv6/ip6mr.c |    5 +++--
 1 files changed, 3 insertions(+), 2 deletions(-)

diff --git a/net/ipv6/ip6mr.c b/net/ipv6/ip6mr.c
index 461e47c..4532973 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));
 
-- 
1.7.7.6

  parent reply	other threads:[~2012-06-27  9:36 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-06-27  9:36 [PATCH 0/7] Get rid of RTA*() macros Thomas Graf
2012-06-27  9:36 ` [PATCH 1/7] unix_diag: Do not use RTA_PUT() macros Thomas Graf
2012-06-27  9:36 ` [PATCH 2/7] sock_diag: " Thomas Graf
2012-06-27 10:00   ` David Laight
2012-06-27 10:07     ` David Miller
2012-06-27 10:07     ` Thomas Graf
2012-06-27  9:36 ` [PATCH 3/7] inet_diag: " Thomas Graf
2012-06-27  9:36 ` [PATCH 4/7] ipmr: " Thomas Graf
2012-06-27  9:36 ` Thomas Graf [this message]
2012-06-27  9:36 ` [PATCH 6/7] decnet: " Thomas Graf
2012-06-27  9:36 ` [PATCH 7/7] netlink: Get rid of obsolete rtnetlink macros Thomas Graf
2012-06-27 15:35   ` Stephen Hemminger
2012-06-27 22:04     ` David Miller
2012-06-27 22:31       ` Stephen Hemminger
2012-06-27 22:37 ` [PATCH 0/7] Get rid of RTA*() macros David Miller

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=f67d0d7010ae44db3c594468b15834dcfc63191f.1340788373.git.tgraf@suug.ch \
    --to=tgraf@suug.ch \
    --cc=davem@davemloft.net \
    --cc=netdev@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.