All of lore.kernel.org
 help / color / mirror / Atom feed
From: Stephen Hemminger <shemminger@vyatta.com>
To: Ang Way Chuang <wcang@sfc.wide.ad.jp>
Cc: "Nicolas de Pesloüan" <nicolas.2p.debian@gmail.com>,
	"David S. Miller" <davem@davemloft.net>,
	netdev@vger.kernel.org
Subject: Re: [PATCH 1/2] bridge: leave carrier on for empty bridge
Date: Mon, 5 Sep 2011 15:45:12 -0700	[thread overview]
Message-ID: <20110905154512.4cce78d6@nehalam.ftrdhcpuser.net> (raw)
In-Reply-To: <4E651CB4.3070707@sfc.wide.ad.jp>

On Tue, 06 Sep 2011 04:02:12 +0900
Ang Way Chuang <wcang@sfc.wide.ad.jp> wrote:

> On 06/09/11 02:57, Stephen Hemminger wrote:
> > The root cause of the problem is applications that don't deal with unresolved
> > IPv6 addresses. I already had to solve this in our distribution for NTP in a
> > not bridge related problem. It is better to fix the applications to understand
> > IPv6 address semantics than to try and force bridge to behave in a way that
> > is friendly to these applications.
> Care to share the patch that you did for NTP? Perhaps, I may apply the same trick and tried it out on dnsmasq and radvd if I have time.

It has been submitted upstream, but probably an eternity until
it ever gets merged through the NTP project...

The problem happens on our system because NTP runs before interfaces
brought up.



commit 0997ebe40b2835a58ba2ea1e504e38d6d29c95ed
Author: Stephen Hemminger <stephen.hemminger@vyatta.com>
Date:   Tue Oct 26 17:55:04 2010 -0700

    Ignore IPV6 Dynamic addresses
    
    During boot link-local addresses are generated dynamically.
    These addresses are in a tentative state until after resolution occurs.
    While in the tentative state, the address can not be bound to.
    NTP daemon will see the address become available later when it rescans.
    
    (revised patch for 4.2.4p6)

diff --git a/lib/isc/unix/interfaceiter.c b/lib/isc/unix/interfaceiter.c
index 87af69e..64a9f4f 100644
--- a/lib/isc/unix/interfaceiter.c
+++ b/lib/isc/unix/interfaceiter.c
@@ -151,6 +151,7 @@ get_addr(unsigned int family, isc_netaddr_t *dst, struct sockaddr *src,
 static isc_result_t linux_if_inet6_next(isc_interfaceiter_t *);
 static isc_result_t linux_if_inet6_current(isc_interfaceiter_t *);
 static void linux_if_inet6_first(isc_interfaceiter_t *iter);
+#include <linux/if_addr.h>
 #endif
 
 #if HAVE_GETIFADDRS
@@ -216,6 +217,11 @@ linux_if_inet6_current(isc_interfaceiter_t *iter) {
 			      "/proc/net/if_inet6:strlen(%s) != 32", address);
 		return (ISC_R_FAILURE);
 	}
+#ifdef __linux
+	/* Ignore DAD addresses -- can't bind to them till resolved */
+	if (flags & IFA_F_TENTATIVE)
+		return (ISC_R_IGNORE);
+#endif
 	for (i = 0; i < 16; i++) {
 		unsigned char byte;
 		static const char hex[] = "0123456789abcdef";

  reply	other threads:[~2011-09-05 22:45 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <20110902172220.830228928@vyatta.com>
2011-09-02 17:22 ` [PATCH 1/2] bridge: leave carrier on for empty bridge Stephen Hemminger
2011-09-02 21:39   ` Nicolas de Pesloüan
2011-09-02 22:11     ` Stephen Hemminger
2011-09-03  2:15       ` Ang Way Chuang
2011-09-03  6:30         ` Stephen Hemminger
2011-09-25  8:55         ` Marc Haber
2011-09-03 18:32       ` Nicolas de Pesloüan
2011-09-04  4:14         ` Stephen Hemminger
2011-09-04  7:35           ` Nicolas de Pesloüan
2011-09-04 16:36             ` Stephen Hemminger
2011-09-04 17:12               ` Krzysztof Olędzki
2011-09-05  4:51                 ` Ang Way Chuang
2011-09-05 17:18               ` Nicolas de Pesloüan
2011-09-05 17:57                 ` Stephen Hemminger
2011-09-05 19:02                   ` Ang Way Chuang
2011-09-05 22:45                     ` Stephen Hemminger [this message]
2011-09-06  6:52                   ` Nicolas de Pesloüan
2011-09-25  9:16                     ` Marc Haber
2011-09-25 20:10                       ` Nicolas de Pesloüan
2011-09-25  9:05             ` Marc Haber
2011-09-02 17:22 ` [PATCH 2/2] bridge: set flags in RTM_NEWNEIGH message correctly Stephen Hemminger
     [not found] <20111004041444.793960297@vyatta.com>
2011-10-04  4:14 ` [PATCH 1/2] bridge: leave carrier on for empty bridge Stephen Hemminger
2011-10-06 19:28   ` David Miller

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20110905154512.4cce78d6@nehalam.ftrdhcpuser.net \
    --to=shemminger@vyatta.com \
    --cc=davem@davemloft.net \
    --cc=netdev@vger.kernel.org \
    --cc=nicolas.2p.debian@gmail.com \
    --cc=wcang@sfc.wide.ad.jp \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.