lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Date:	Mon, 4 Apr 2016 15:55:34 +0300
From:	Sergei Shtylyov <sergei.shtylyov@...entembedded.com>
To:	Liping Zhang <zlpnobody@....com>, davem@...emloft.net
Cc:	netdev@...r.kernel.org, Liping Zhang <liping.zhang@...eadtrum.com>
Subject: Re: [PATCH] net: socket: return a proper error code when source
 address becomes nonlocal

Hello.

On 4/4/2016 10:09 AM, Liping Zhang wrote:

> From: Liping Zhang <liping.zhang@...eadtrum.com>
>
> 1. Socket can use bind(directly) or connect(indirectly) to bind to a local
>     ip address, and later if the network becomes down, that cause the source
>     address becomes nonlocal, then send() call will fail and return EINVAL.
>     But this error code is confusing, acctually we did not pass any invalid
>     arguments. Furthermore, send() maybe return ok at first, it now returns
>     fail just because of a temporary network problem, i.e. when the network
>     recovery, send() call will become ok. Return EADDRNOTAVAIL instead of
>     EINVAL in such situation is better.
> 2. We can use IPV6_PKTINFO to specify the ipv6 source address when call
>     sendmsg() to send packet, but if the address is not available, call will
>     fail and EINVAL is returned. This error code is not very appropriate,
>     it failed maybe just because of a temporary network problem. Also
>     RFC3542, section 6.6 describe an example returns EADDRNOTAVAIL:
>     "ipi6_ifindex specifies an interface but the address ipi6_addr is not
>     available for use on that interface.". So return EADDRNOTAVAIL instead
>     of EINVAL here.
>
> Signed-off-by: Liping Zhang <liping.zhang@...eadtrum.com>

    I think this should be 2 patches as you seem to fix 2 separate problems.

[...]

MBR, Sergei

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ