qubes-linux-kernel/patches.xen/ipv6-no-autoconf

36 lines
1.5 KiB
Plaintext
Raw Normal View History

From: Olaf Kirch <okir@suse.de>
Subject: Allow to bring up network interface w/o ipv6 autoconf
References: bnc#161888
Patch-mainline: no
When bringing up a xen bridge device, it will always be configured to
use a MAC address of ff:ff:ff:ff:ff:fe. This greatly confuses IPv6 DAD,
which starts logging lots and lots of useless messages to syslog.
We really want to disable IPv6 on these interfaces, and there doesn't
seem to be a reliable way to do this without bringing the interface
up first (and triggering IPv6 autoconf).
This patch makes autoconf (DAD and router discovery) depend on the
interface's ability to do multicast. Turning off multicast for an
interface before bringing it up will suppress autoconfiguration.
--- head-2010-04-15.orig/net/ipv6/addrconf.c 2010-04-15 09:37:46.000000000 +0200
+++ head-2010-04-15/net/ipv6/addrconf.c 2010-04-15 09:39:07.000000000 +0200
@@ -2832,6 +2832,7 @@ static void addrconf_dad_start(struct in
spin_lock(&ifp->lock);
if (dev->flags&(IFF_NOARP|IFF_LOOPBACK) ||
+ !(dev->flags&IFF_MULTICAST) ||
idev->cnf.accept_dad < 1 ||
!(ifp->flags&IFA_F_TENTATIVE) ||
ifp->flags & IFA_F_NODAD) {
@@ -2925,6 +2926,7 @@ static void addrconf_dad_completed(struc
if (ifp->idev->cnf.forwarding == 0 &&
ifp->idev->cnf.rtr_solicits > 0 &&
(dev->flags&IFF_LOOPBACK) == 0 &&
+ (dev->flags & IFF_MULTICAST) &&
(ipv6_addr_type(&ifp->addr) & IPV6_ADDR_LINKLOCAL)) {
/*
* If a host as already performed a random delay