Bug #280

ntp patch for ipv6 dad addresses

Added by David Taht on Sep 25, 2011. Updated on Nov 18, 2011.
New Normal Dave Täht

Description

———- Forwarded message ———-
From: Stephen Hemminger shemminger@vyatta.com
Date: Mon, Sep 5, 2011 at 3:45 PM
Subject: Re: [PATCH 12] bridge: leave carrier on for empty bridge
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

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”;

History

Updated by Dave Täht on Nov 18, 2011.
We need to fix ntp.

This is a static export of the original bufferbloat.net issue database. As such, no further commenting is possible; the information is solely here for archival purposes.
RSS feed

Recent Updates

Oct 20, 2023 Wiki page
What Can I Do About Bufferbloat?
Dec 3, 2022 Wiki page
Codel Wiki
Jun 11, 2022 Wiki page
More about Bufferbloat
Jun 11, 2022 Wiki page
Tests for Bufferbloat
Dec 7, 2021 Wiki page
Getting SQM Running Right

Find us elsewhere

Bufferbloat Mailing Lists
#bufferbloat on Twitter
Google+ group
Archived Bufferbloat pages from the Wayback Machine

Sponsors

Comcast Research Innovation Fund
Nlnet Foundation
Shuttleworth Foundation
GoFundMe

Bufferbloat Related Projects

OpenWrt Project
Congestion Control Blog
Flent Network Test Suite
Sqm-Scripts
The Cake shaper
AQMs in BSD
IETF AQM WG
CeroWrt (where it all started)

Network Performance Related Resources


Jim Gettys' Blog - The chairman of the Fjord
Toke's Blog - Karlstad University's work on bloat
Voip Users Conference - Weekly Videoconference mostly about voip
Candelatech - A wifi testing company that "gets it".