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: Vlad Yasevich
Date: Tuesday, March 17, 2009 - 6:47 am

Felix von Leitner wrote:

Sorry, I just don't buy this.  You imply that you don't want the overhead
of storing IPv6 addresses, but you still get this with ::ffff:0.0.0.0.
In fact, now your overhead is even worse since ever IPv4 address will be
stored stored and interpreted as IPv6 128 bit address.

If you really care about overhead, run 2 services.  Your IPv6 service
will only track real IPv6 addresses and will reduce you total overhead.

If you don't care about overhead, just bind a single socket to :: and
you will get behavior identical for the ::fff:0.0.0.0 case, but with
the added benefit of tracking real ipv6 addresses as well.

Having written support for ::ffff:0.0.0.0, I've always thought it was
a bastardized case that didn't provide any benefits.  It was like saying:
"I've got IPv6 on my system, but I don't really support it, even though
I pretend that I do."


Because that case doesn't provide any benefits.  It only has the drawback that
you have to deal with ipv4-mapped IPv6 addresses witch is the overhead of
the whole thing.

If you are prepared to deal with it, you might as well deal with real ipv6 addresses
at the same time and mitigate your overhead somewhat.

-vlad

--
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 ..., Vlad Yasevich, (Tue Mar 17, 6:47 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)