[FFmpeg-devel] [PATCH] Use getaddrinfo in resolve_host (ipv6 support)

Ronald S. Bultje rsbultje
Mon Sep 10 22:10:44 CEST 2007


On 9/10/07, Andreas ?man <andreas at olebyn.nu> wrote:
> Ronald S. Bultje wrote:
> > [*] url_split() is problematic because of ambiguity in host:port in
> > ipv6-addresses. Valid ipv6 address representations are ::<num>,
> > ::<num>:<num>, a:b:c:d:e:f:g:h and a:b:c:d:e:f:w.x.y.z and a variety of
> > combinations between those, as long as there's only one :: in it (which
> > means pad this with zeroes to make 8 shorts in total). Obviously, this
> leads
> > to problems if we try to parse an address such as ::1:80, is this ::1
> port
> > 80 or 0:0:0:0:0:0:1:80? url_split() parses this as a host, which is what
> > Apache does too. We support :::80 (tripple colons), full address
> notition
> > with port (0:0:0:0:0:0:0:0:80, i.e. 8 colons), dotted notation for the
> last
> > 4 bytes (::a.b.c.d:80) or space-separated notition (host port instead of
> > host:port). Comments on this welcome.
> I haven't examined your patch in detail, but rfc2732 deals with this
> ambiguity by specifying that you should add brackets '[]' around
> the address itself, like:
>        http://[FEDC:BA98:7654:3210:FEDC:BA98:7654:3210]:80/index.html
> It's what a bunch of applications out there do and i think it would
> be wise to have the same behavior in ffmpeg aswell.

Ah, yes, the Apache module did that too but I couldn't find it in 2373 so I
didn't add it. I'll try to add that one as well, in addition to all the
previous ones.


More information about the ffmpeg-devel mailing list