Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1711781
| From | David Miller <davem@davemloft.net> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | Re: [PATCH v2] sctp: fully initialize the IPv6 address in sctp_v6_to_addr() |
| Date | 2017-08-15 04:50 +0200 |
| Message-ID | <ueA5z-3To-5@gated-at.bofh.it> (permalink) |
| References | <uesB4-7Hs-15@gated-at.bofh.it> <uez9x-3gj-59@gated-at.bofh.it> <uezjd-3jP-33@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
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.
Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
[PATCH v2] sctp: fully initialize the IPv6 address in sctp_v6_to_addr() Alexander Potapenko <glider@google.com> - 2017-08-14 20:50 +0200
Re: [PATCH v2] sctp: fully initialize the IPv6 address in sctp_v6_to_addr() Marcelo Ricardo Leitner <marcelo.leitner@gmail.com> - 2017-08-15 01:10 +0200
Re: [PATCH v2] sctp: fully initialize the IPv6 address in sctp_v6_to_addr() 吉藤英明 <hideaki.yoshifuji@miraclelinux.com> - 2017-08-15 03:50 +0200
Re: [PATCH v2] sctp: fully initialize the IPv6 address in sctp_v6_to_addr() Marcelo Ricardo Leitner <marcelo.leitner@gmail.com> - 2017-08-15 04:00 +0200
Re: [PATCH v2] sctp: fully initialize the IPv6 address in sctp_v6_to_addr() David Miller <davem@davemloft.net> - 2017-08-15 04:50 +0200
Re: [PATCH v2] sctp: fully initialize the IPv6 address in sctp_v6_to_addr() Marcelo Ricardo Leitner <marcelo.leitner@gmail.com> - 2017-08-15 17:10 +0200
Re: [PATCH v2] sctp: fully initialize the IPv6 address in sctp_v6_to_addr() Eric Dumazet <eric.dumazet@gmail.com> - 2017-08-15 17:40 +0200
Re: [PATCH v2] sctp: fully initialize the IPv6 address in sctp_v6_to_addr() Marcelo Ricardo Leitner <marcelo.leitner@gmail.com> - 2017-08-15 18:40 +0200
csiph-web