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] [thread-next>] [day] [month] [year] [list]
Date:	Thu, 2 Feb 2012 18:22:51 -0700
From:	"Erich E. Hoover" <ehoover@...es.edu>
To:	Eric Dumazet <eric.dumazet@...il.com>
Cc:	Linux Netdev <netdev@...r.kernel.org>
Subject: Re: [PATCH v2] Implement IP_UNICAST_IF socket option.

On Thu, Feb 2, 2012 at 3:45 PM, Eric Dumazet <eric.dumazet@...il.com> wrote:
> Le jeudi 02 février 2012 à 15:29 -0700, Erich E. Hoover a écrit :
> > ...
> > Would it be better if ip_default_ifindex performed the same comparison
> > and prioritized the sk->sk_bound_dev_if value?
> I guess you should mimic other OS behavior. Tests are probably needed.

This isn't the best example since the test machines only have one NIC
and the loopback adapter (the loopback adapter acts differently), but
I generated some test results on the Wine TestBot.

Where bind() and IP_UNICAST_IF match:
https://testbot.winehq.org/JobDetails.pl?Key=16802

Mismatch between bind() and IP_UNICAST_IF:
https://testbot.winehq.org/JobDetails.pl?Key=16803

In both cases the loopback adapter rejects IP_UNICAST_IF and the test
"succeeds" for the NIC (the packet comes back on the same interface).
In both cases IP_UNICAST_IF is set before bind(), so this would seem
to indicate that bind() overrides IP_UNICAST_IF even if the bind()
occurs afterward.

> > > IPv6 not supported ?
> >
> > Nope, at least according to the documentation the option is only for
> > IPv4 (IPPROTO_IP).
>
> Probably because of the mix on interface index and IPv4 addr on "other
> OS".
>
> But if we implement interface index only, it could be used on IPv6
> too... I dont know...

I though I should double check this, and apparently I missed that
there's an equivalent IPV6_UNICAST_IF on "other OS".  Should that be a
patch 2 or should it be included in this one?

Erich Hoover
ehoover@...es.edu
--
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