From: David Miller <davem@davemloft.net>
To: marcelo.leitner@gmail.com
Cc: hideaki.yoshifuji@miraclelinux.com, glider@google.com,
dvyukov@google.com, kcc@google.com, edumazet@google.com,
lucien.xin@gmail.com, vyasevich@gmail.com,
linux-kernel@vger.kernel.org, linux-sctp@vger.kernel.org,
netdev@vger.kernel.org, yoshfuji@linux-ipv6.org
Subject: Re: [PATCH v2] sctp: fully initialize the IPv6 address in sctp_v6_to_addr()
Date: Mon, 14 Aug 2017 19:40:51 -0700 (PDT) [thread overview]
Message-ID: <20170814.194051.1408830683580606508.davem@davemloft.net> (raw)
In-Reply-To: <20170815015814.GB18688@localhost.localdomain>
From: Marcelo Ricardo Leitner <marcelo.leitner@gmail.com>
Date: Mon, 14 Aug 2017 22:58:14 -0300
> On Tue, Aug 15, 2017 at 10:43:59AM +0900, 吉藤英明 wrote:
>> > diff --git a/net/sctp/ipv6.c b/net/sctp/ipv6.c
>> > index 2a186b201ad2..a15d691829c6 100644
>> > --- a/net/sctp/ipv6.c
>> > +++ b/net/sctp/ipv6.c
>> > @@ -513,6 +513,8 @@ static void sctp_v6_to_addr(union sctp_addr *addr, struct in6_addr *saddr,
>> > addr->sa.sa_family = AF_INET6;
>> > addr->v6.sin6_port = port;
>> > addr->v6.sin6_addr = *saddr;
>> > + addr->v6.sin6_flowinfo = 0;
>> > + addr->v6.sin6_scope_id = 0;
>>
>> Please set flowinfo between port and addr.
>
> Why?
Store buffer compression.
You want to always initialize structure member in the order
they are in memory.
No, the compiler won't do this automatically.
next prev parent reply other threads:[~2017-08-15 2:40 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-08-14 18:43 [PATCH v2] sctp: fully initialize the IPv6 address in sctp_v6_to_addr() Alexander Potapenko
2017-08-14 23:07 ` Marcelo Ricardo Leitner
2017-08-15 1:43 ` 吉藤英明
2017-08-15 1:58 ` Marcelo Ricardo Leitner
2017-08-15 2:40 ` David Miller [this message]
2017-08-15 15:05 ` Marcelo Ricardo Leitner
2017-08-15 15:37 ` Eric Dumazet
2017-08-15 16:31 ` Marcelo Ricardo Leitner
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=20170814.194051.1408830683580606508.davem@davemloft.net \
--to=davem@davemloft.net \
--cc=dvyukov@google.com \
--cc=edumazet@google.com \
--cc=glider@google.com \
--cc=hideaki.yoshifuji@miraclelinux.com \
--cc=kcc@google.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-sctp@vger.kernel.org \
--cc=lucien.xin@gmail.com \
--cc=marcelo.leitner@gmail.com \
--cc=netdev@vger.kernel.org \
--cc=vyasevich@gmail.com \
--cc=yoshfuji@linux-ipv6.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).