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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <200805132037.39580.rdenis@simphalempin.com>
Date:	Tue, 13 May 2008 20:37:38 +0300
From:	Rémi Denis-Courmont <rdenis@...phalempin.com>
To:	Gerrit Renker <gerrit@....abdn.ac.uk>
Cc:	Arnaldo Carvalho de Melo <acme@...hat.com>,
	David Stevens <dlstevens@...ibm.com>,
	David Miller <davem@...emloft.net>, dccp@...r.kernel.org,
	netdev@...r.kernel.org, Ulrich Drepper <drepper@...hat.com>
Subject: Re: [RFC] [DCCP]: Deprecate SOCK_DCCP in favour of SOCK_DGRAM

Le Tuesday 13 May 2008 20:03:25 Gerrit Renker, vous avez écrit :
> Using work-arounds is brittle and frustrating when the API behaviour
> suddenly changes. My experience of using such a wrapper was:
>
>  * it passed UDP(-Lite), TCP through without changing the socket type;
>  * when passed DCCP, it set the socket type to 0, to avoid `ai_socktype
>    not supported' getaddrinfo error;

>  * this used to work fine until about January, when something in the
>    lookup machinery for dual-stack hosts changed:
>    - before, AF_UNSPEC + ai_socktype=0 put IPv6 first into the result list,
>    - now the the result order is reversed (IPv4 sockets are returned first)

You're probably using a recent libc that applies RFC3484 _properly_. If you 
still want IPv6 first, no matter what addresses the host has, I think the 
AI_PASSIVE flag should do the trick. Then again, working around RFC3484 
policy is _not_ a good idea.

As far as I am concerned, for DCCP, I (meaning VLC) currently use SOCK_STREAM, 
and overrides the socktype and protocol fields in the socket() call 
manually - so I don't get a TCP socjet.

In any case, getaddrinfo() should be patched to
1/ accept ai_socktype == SOCK_DCCP and ai_protocol == IPPROTO_DCCP,
2/ accept ai_socktype == SOCK_DCCP and ai_protocol == 0,
   and set ai_protocol to IPPROTO_DCCP in the results,
3/ (perhaps?) accept ai_protocol == IPPROTO_DCCP and ai_socktype == 0,
   and set ai_socktype to SOCK_DCCP in the results.

Similarly:
1/ accept ai_socktype == SOCK_DGRAM and ai_protocol == IPPROTO_UDPLITE,
2/ (intentionally omitted - keep normal UDP non-Lite behavior)
3/ (perhaps?) accept ai_protocol == IPPROTO_UDPLITE and ai_socktype == 0,
   and set ai_socktype to SOCK_DGRAM in the results.

Voilà. Best to check this with Ulrich Drepper, no?

-- 
Rémi Denis-Courmont
http://www.remlab.net/
--
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

Powered by Openwall GNU/*/Linux Powered by OpenVZ