Re: socket api problem: can't bind an ipv6 socket to ::ffff:0.0.0.0

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
From: Felix von Leitner
Date: Tuesday, March 17, 2009 - 5:58 am

> I don't think this ever worked on Linux, from the very beginning of inet6_bind():


What is the harm in allowing this?  That way an application ported to
IPv6 can still bind IPv4-only.  Why would it be legal to bind to a
specific IPv4 address but not to all IPv4 addresses?

The specific case is a bittorrent tracker.  The code was ported to IPv6,
but since there is so much overhead in storing IPv6 addresses you are
supposed to run two processes, one on the IPv6 address and one on the
IPv4 address (the IPv4 one then does not have overhead).  The sane way
to do this is to bind the IPv6 socket to ::ffff:0.0.0.0 then.  Otherwise
you would need some kind of giant abstraction layer in the application.
And we specifically added the ipv4 mapped addresses so applications
would not need to have a giant abstraction layer.

Did I mention *BSD and OSX allow this?


Why would you say that?

Felix
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
socket api problem: can't bind an ipv6 socket to ::ffff:0. ..., Felix von Leitner, (Mon Mar 16, 4:48 pm)
Re: socket api problem: can't bind an ipv6 socket to ::fff ..., Stephen Hemminger, (Mon Mar 16, 5:00 pm)
Re: socket api problem: can't bind an ipv6 socket to ::fff ..., Felix von Leitner, (Mon Mar 16, 5:18 pm)
Re: socket api problem: can't bind an ipv6 socket to ::fff ..., Felix von Leitner, (Tue Mar 17, 5:58 am)
Re: socket api problem: can't bind an ipv6 socket to ::fff ..., Felix von Leitner, (Tue Mar 17, 7:14 am)
Re: socket api problem: can't bind an ipv6 socket to ::fff ..., Felix von Leitner, (Tue Mar 17, 10:51 am)
Re: socket api problem: can't bind an ipv6 socket to ::fff ..., Felix von Leitner, (Tue Mar 17, 11:01 am)