[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <1421348761.11734.83.camel@edumazet-glaptop2.roam.corp.google.com>
Date: Thu, 15 Jan 2015 11:06:01 -0800
From: Eric Dumazet <eric.dumazet@...il.com>
To: Willem de Bruijn <willemb@...gle.com>
Cc: netdev@...r.kernel.org, davem@...emloft.net
Subject: Re: [PATCH net] ip: zero sockaddr returned on error queue
On Thu, 2015-01-15 at 13:18 -0500, Willem de Bruijn wrote:
> From: Willem de Bruijn <willemb@...gle.com>
>
> The sockaddr is returned in IP(V6)_RECVERR as part of errhdr. That
> structure is defined and allocated on the stack as
>
> struct {
> struct sock_extended_err ee;
> struct sockaddr_in(6) offender;
> } errhdr;
>
> The second part is only initialized for certain SO_EE_ORIGIN values.
> Always initialize it completely.
>
> An MTU exceeded error on a SOCK_RAW/IPPROTO_RAW is one example that
> would return uninitialized bytes.
>
> Signed-off-by: Willem de Bruijn <willemb@...gle.com>
>
> ----
Acked-by: Eric Dumazet <edumazet@...gle.com>
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists