]>
Commit | Line | Data |
---|---|---|
cc90b958 BS |
1 | From: Olaf Kirch <okir@suse.de> |
2 | Subject: Allow to bring up network interface w/o ipv6 autoconf | |
3 | References: 161888 | |
4 | ||
5 | When bringing up a xen bridge device, it will always be configured to | |
6 | use a MAC address of ff:ff:ff:ff:ff:fe. This greatly confuses IPv6 DAD, | |
7 | which starts logging lots and lots of useless messages to syslog. | |
8 | ||
9 | We really want to disable IPv6 on these interfaces, and there doesn't | |
10 | seem to be a reliable way to do this without bringing the interface | |
11 | up first (and triggering IPv6 autoconf). | |
12 | ||
13 | This patch makes autoconf (DAD and router discovery) depend on the | |
14 | interface's ability to do multicast. Turning off multicast for an | |
15 | interface before bringing it up will suppress autoconfiguration. | |
16 | ||
17 | net/ipv6/addrconf.c | 2 ++ | |
18 | 1 files changed, 2 insertions(+) | |
19 | ||
20 | Index: head-2008-09-25/net/ipv6/addrconf.c | |
21 | =================================================================== | |
22 | --- head-2008-09-25.orig/net/ipv6/addrconf.c 2008-09-25 13:56:12.000000000 +0200 | |
23 | +++ head-2008-09-25/net/ipv6/addrconf.c 2008-09-25 14:15:19.000000000 +0200 | |
24 | @@ -2781,6 +2781,7 @@ static void addrconf_dad_start(struct in | |
25 | spin_lock_bh(&ifp->lock); | |
26 | ||
27 | if (dev->flags&(IFF_NOARP|IFF_LOOPBACK) || | |
28 | + !(dev->flags&IFF_MULTICAST) || | |
29 | idev->cnf.accept_dad < 1 || | |
30 | !(ifp->flags&IFA_F_TENTATIVE) || | |
31 | ifp->flags & IFA_F_NODAD) { | |
32 | @@ -2878,6 +2879,7 @@ static void addrconf_dad_completed(struc | |
33 | if (ifp->idev->cnf.forwarding == 0 && | |
34 | ifp->idev->cnf.rtr_solicits > 0 && | |
35 | (dev->flags&IFF_LOOPBACK) == 0 && | |
36 | + (dev->flags & IFF_MULTICAST) && | |
37 | (ipv6_addr_type(&ifp->addr) & IPV6_ADDR_LINKLOCAL)) { | |
38 | /* | |
39 | * If a host as already performed a random delay |