From: Nicolas Dichtel <nicolas.dichtel@6wind.com>
To: netdev@vger.kernel.org
Cc: davem@davemloft.net, Nicolas Dichtel <nicolas.dichtel@6wind.com>
Subject: [PATCH net-next 4/4] gre6: fix rtnl dump messages
Date: Fri, 9 Nov 2012 10:51:11 +0100 [thread overview]
Message-ID: <1352454671-4336-5-git-send-email-nicolas.dichtel@6wind.com> (raw)
In-Reply-To: <1352454671-4336-1-git-send-email-nicolas.dichtel@6wind.com>
Spotted after a code review.
Signed-off-by: Nicolas Dichtel <nicolas.dichtel@6wind.com>
---
net/ipv6/ip6_gre.c | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/net/ipv6/ip6_gre.c b/net/ipv6/ip6_gre.c
index bbe2e7b..12aa473 100644
--- a/net/ipv6/ip6_gre.c
+++ b/net/ipv6/ip6_gre.c
@@ -1633,9 +1633,9 @@ static size_t ip6gre_get_size(const struct net_device *dev)
/* IFLA_GRE_OKEY */
nla_total_size(4) +
/* IFLA_GRE_LOCAL */
- nla_total_size(4) +
+ nla_total_size(sizeof(struct in6_addr)) +
/* IFLA_GRE_REMOTE */
- nla_total_size(4) +
+ nla_total_size(sizeof(struct in6_addr)) +
/* IFLA_GRE_TTL */
nla_total_size(1) +
/* IFLA_GRE_TOS */
@@ -1659,8 +1659,8 @@ static int ip6gre_fill_info(struct sk_buff *skb, const struct net_device *dev)
nla_put_be16(skb, IFLA_GRE_OFLAGS, p->o_flags) ||
nla_put_be32(skb, IFLA_GRE_IKEY, p->i_key) ||
nla_put_be32(skb, IFLA_GRE_OKEY, p->o_key) ||
- nla_put(skb, IFLA_GRE_LOCAL, sizeof(struct in6_addr), &p->raddr) ||
- nla_put(skb, IFLA_GRE_REMOTE, sizeof(struct in6_addr), &p->laddr) ||
+ nla_put(skb, IFLA_GRE_LOCAL, sizeof(struct in6_addr), &p->laddr) ||
+ nla_put(skb, IFLA_GRE_REMOTE, sizeof(struct in6_addr), &p->raddr) ||
nla_put_u8(skb, IFLA_GRE_TTL, p->hop_limit) ||
/*nla_put_u8(skb, IFLA_GRE_TOS, t->priority) ||*/
nla_put_u8(skb, IFLA_GRE_ENCAP_LIMIT, p->encap_limit) ||
--
1.7.12
next prev parent reply other threads:[~2012-11-09 9:40 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-11-09 9:51 [PATCH net-next 0/4] Advertise tunnel parameters via netlink Nicolas Dichtel
2012-11-09 9:51 ` [PATCH net-next 1/4] ipip: advertise tunnel param via rtnl Nicolas Dichtel
2012-11-09 13:20 ` Eric Dumazet
2012-11-09 16:09 ` [PATCH net-next 0/3] Advertise tunnel parameters via netlink Nicolas Dichtel
2012-11-09 16:09 ` [PATCH net-next 1/3] ipip: advertise tunnel param via rtnl Nicolas Dichtel
2012-11-09 16:37 ` Eric Dumazet
2012-11-09 17:00 ` Nicolas Dichtel
2012-11-09 19:42 ` Eric Dumazet
2012-11-09 16:10 ` [PATCH net-next 2/3] sit: " Nicolas Dichtel
2012-11-09 16:10 ` [PATCH net-next 3/3] ip6tnl: " Nicolas Dichtel
2012-11-10 0:36 ` [PATCH net-next 0/3] Advertise tunnel parameters via netlink David Miller
2012-11-09 9:51 ` [PATCH net-next 2/4] sit: advertise tunnel param via rtnl Nicolas Dichtel
2012-11-09 9:51 ` [PATCH net-next 3/4] ip6tnl: " Nicolas Dichtel
2012-11-09 9:51 ` Nicolas Dichtel [this message]
2012-11-09 13:22 ` [PATCH net-next 4/4] gre6: fix rtnl dump messages Eric Dumazet
2012-11-09 15:34 ` [PATCH] " Nicolas Dichtel
2012-11-09 16:09 ` Eric Dumazet
2012-11-09 22:11 ` 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=1352454671-4336-5-git-send-email-nicolas.dichtel@6wind.com \
--to=nicolas.dichtel@6wind.com \
--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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).