Olaf Hering
2014-Jan-23 22:44 UTC
[Libguestfs] [PATCH] appliance: Disable ipv6 in the appliance because qemu usernet is ipv4 only
Signed-off-by: Olaf Hering <olaf@aepfle.de> --- Untested in this environment. appliance/init | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/appliance/init b/appliance/init index b25ea26..cc8c978 100755 --- a/appliance/init +++ b/appliance/init @@ -71,6 +71,10 @@ for f in /sys/block/{h,s,ub,v}d*/queue/scheduler; do echo noop > $f; done # Update the system clock. hwclock -u -s +# Disable ipv6 because host names resolve to ipv4 and ipv6 +# Resolver may prefer ipv6 and qemu usernet does only ipv4 +for f in /proc/sys/net/ipv6/conf/*/disable_ipv6; do if test -w $f ; then echo 1 > $f; fi; done + # Set up the network. ip addr add 127.0.0.1/8 brd + dev lo scope host ip link set dev lo up
Olaf Hering
2014-Jan-23 22:46 UTC
Re: [Libguestfs] [PATCH] appliance: Disable ipv6 in the appliance because qemu usernet is ipv4 only
On Thu, Jan 23, Olaf Hering wrote:> +++ b/appliance/init > # Update the system clock. > hwclock -u -sWhy is that needed? Just wondering... Olaf
Richard W.M. Jones
2014-Jan-24 10:26 UTC
Re: [Libguestfs] [PATCH] appliance: Disable ipv6 in the appliance because qemu usernet is ipv4 only
On Thu, Jan 23, 2014 at 11:46:33PM +0100, Olaf Hering wrote:> On Thu, Jan 23, Olaf Hering wrote: > > > +++ b/appliance/init > > # Update the system clock. > > hwclock -u -s > > Why is that needed? Just wondering...I suspect it's not needed at all. Rich. -- Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjones virt-top is 'top' for virtual machines. Tiny program with many powerful monitoring features, net stats, disk stats, logging, etc. http://people.redhat.com/~rjones/virt-top
Richard W.M. Jones
2014-Jan-24 10:29 UTC
Re: [Libguestfs] [PATCH] appliance: Disable ipv6 in the appliance because qemu usernet is ipv4 only
On Thu, Jan 23, 2014 at 11:44:52PM +0100, Olaf Hering wrote:> Signed-off-by: Olaf Hering <olaf@aepfle.de> > --- > > Untested in this environment. > > appliance/init | 4 ++++ > 1 file changed, 4 insertions(+) > > diff --git a/appliance/init b/appliance/init > index b25ea26..cc8c978 100755 > --- a/appliance/init > +++ b/appliance/init > @@ -71,6 +71,10 @@ for f in /sys/block/{h,s,ub,v}d*/queue/scheduler; do echo noop > $f; done > # Update the system clock. > hwclock -u -s > > +# Disable ipv6 because host names resolve to ipv4 and ipv6 > +# Resolver may prefer ipv6 and qemu usernet does only ipv4 > +for f in /proc/sys/net/ipv6/conf/*/disable_ipv6; do if test -w $f ; then echo 1 > $f; fi; doneThere's no error checking in init, so this should work: for f in /proc/sys/net/ipv6/conf/*/disable_ipv6; do echo 1 > $f; done However I don't understand why disabling IPv6 should be necessary. If sites resolve to AAAA+A records, then presumably it's going to choose the A (IPv4) route since no IPv6 route exists. If a site resolves to only an AAAA record, then it's not reachable whatever we do. Rich. -- Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjones virt-top is 'top' for virtual machines. Tiny program with many powerful monitoring features, net stats, disk stats, logging, etc. http://people.redhat.com/~rjones/virt-top
Olaf Hering
2014-Jan-24 10:55 UTC
Re: [Libguestfs] [PATCH] appliance: Disable ipv6 in the appliance because qemu usernet is ipv4 only
On Fri, Jan 24, Richard W.M. Jones wrote:> However I don't understand why disabling IPv6 should be necessary. If > sites resolve to AAAA+A records, then presumably it's going to choose > the A (IPv4) route since no IPv6 route exists. If a site resolves to > only an AAAA record, then it's not reachable whatever we do.For me the code tries to reach the ipv6 address, which wont work. Olaf
Reasonably Related Threads
- Re: [PATCH] appliance: Disable ipv6 in the appliance because qemu usernet is ipv4 only
- Re: [PATCH] appliance: Disable ipv6 in the appliance because qemu usernet is ipv4 only
- Re: [PATCH] appliance: Disable ipv6 in the appliance because qemu usernet is ipv4 only
- Re: [PATCH] appliance: Disable ipv6 in the appliance because qemu usernet is ipv4 only
- Re: [PATCH] appliance: Disable ipv6 in the appliance because qemu usernet is ipv4 only