NetBSD Problem Report #45308
From Manuel.Bouyer@lip6.fr Mon Aug 29 16:28:00 2011
Return-Path: <Manuel.Bouyer@lip6.fr>
Received: from mail.netbsd.org (mail.netbsd.org [204.152.190.11])
by www.NetBSD.org (Postfix) with ESMTP id 59C7363C0E2
for <gnats-bugs@gnats.NetBSD.org>; Mon, 29 Aug 2011 16:28:00 +0000 (UTC)
Message-Id: <20110829162756.91FD034C41@armandeche.soc.lip6.fr>
Date: Mon, 29 Aug 2011 18:27:56 +0200 (MEST)
From: Manuel.Bouyer@lip6.fr
Reply-To: Manuel.Bouyer@lip6.fr
To: gnats-bugs@gnats.NetBSD.org
Subject: ntpd doens't listen to broadcast anymore
X-Send-Pr-Version: 3.95
>Number: 45308
>Category: bin
>Synopsis: ntpd doens't listen to broadcast anymore
>Confidential: no
>Severity: serious
>Priority: medium
>Responsible: bin-bug-people
>State: closed
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Mon Aug 29 16:30:00 +0000 2011
>Closed-Date: Fri Jan 20 11:49:48 +0000 2012
>Last-Modified: Fri Jan 20 11:49:48 +0000 2012
>Originator: Manuel.Bouyer@lip6.fr
>Release: NetBSD 5.99.52
>Organization:
>Environment:
System: NetBSD comore.lip6.fr 5.99.52 NetBSD 5.99.52 (XEN3_DOMU) #59: Mon Jun 20 21:32:56 CEST 2011 bouyer@roll:/dsk/l1/misc/bouyer/tmp/amd64/obj/dsk/l1/misc/bouyer/current/src/sys/arch/amd64/compile/XEN3_DOMU amd64
Architecture: x86_64
Machine: amd64
>Description:
I'm running ntpd with '-A -b' on most of my client systems;
I have 2 servers broadcasting ntp packets on local nets.
This works fine for netbsd-5 (and previous) hosts but I noticed
this doesn't work with HEAD: ntpd logs
Aug 29 18:04:08 comore ntpd[530]: Unable to listen for broadcasts, no broadcast interfaces available
and no ntp packets are accepted.
debug (ntpd -A -b -d -d) shows that this message shows up
*before* ntpd has probed any interface, so indeed there's no
broadcast interface because there's no interface at all at this time.
Adding -I iface to the command line doesn't help.
>How-To-Repeat:
ntpd -A -b, notice ntpd doesn't sync although tcpdump shows incoming
broadcast ntpd messages
>Fix:
The patch below makes -b works as expected: after probing
interfaces, call io_setbclient() again so it can work on a non-empty
interface list.
I've no idea if this is the right way of fixing this though ...
Index: ntpd/ntp_io.c
===================================================================
RCS file: /cvsroot/src/external/bsd/ntp/dist/ntpd/ntp_io.c,v
retrieving revision 1.5
diff -u -p -u -r1.5 ntp_io.c
--- ntpd/ntp_io.c 9 Jan 2011 14:49:40 -0000 1.5
+++ ntpd/ntp_io.c 29 Aug 2011 16:18:00 -0000
@@ -1782,6 +1782,9 @@ create_sockets(
create_wildcards(port);
update_interfaces(port, NULL, NULL);
+
+ if (sys_bclient)
+ io_setbclient();
/*
* Now that we have opened all the sockets, turn off the reuse
>Release-Note:
>Audit-Trail:
From: "Christos Zoulas" <christos@netbsd.org>
To: gnats-bugs@gnats.NetBSD.org
Cc:
Subject: PR/45308 CVS commit: src/external/bsd/ntp/dist/ntpd
Date: Wed, 14 Sep 2011 12:18:29 -0400
Module Name: src
Committed By: christos
Date: Wed Sep 14 16:18:29 UTC 2011
Modified Files:
src/external/bsd/ntp/dist/ntpd: ntp_io.c
Log Message:
PR/45308: Manuel Bouyer: Update list of broadcast addresses after updating
interfaces.
To generate a diff of this commit:
cvs rdiff -u -r1.5 -r1.6 src/external/bsd/ntp/dist/ntpd/ntp_io.c
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
State-Changed-From-To: open->feedback
State-Changed-By: wiz@NetBSD.org
State-Changed-When: Wed, 14 Sep 2011 21:33:42 +0000
State-Changed-Why:
Christos committed something, ok to close?
From: Manuel Bouyer <bouyer@antioche.eu.org>
To: gnats-bugs@NetBSD.org
Cc: gnats-admin@NetBSD.org, netbsd-bugs@NetBSD.org, wiz@NetBSD.org
Subject: Re: bin/45308 (ntpd doens't listen to broadcast anymore)
Date: Fri, 20 Jan 2012 12:41:43 +0100
On Wed, Sep 14, 2011 at 09:33:46PM +0000, wiz@NetBSD.org wrote:
> Synopsis: ntpd doens't listen to broadcast anymore
>
> State-Changed-From-To: open->feedback
> State-Changed-By: wiz@NetBSD.org
> State-Changed-When: Wed, 14 Sep 2011 21:33:42 +0000
> State-Changed-Why:
> Christos committed something, ok to close?
Yes, it's working now
(and sorry for the delay)
--
Manuel Bouyer <bouyer@antioche.eu.org>
NetBSD: 26 ans d'experience feront toujours la difference
--
State-Changed-From-To: feedback->closed
State-Changed-By: wiz@NetBSD.org
State-Changed-When: Fri, 20 Jan 2012 11:49:48 +0000
State-Changed-Why:
Confirmed fixed, thanks.
>Unformatted:
(also checked on up do date HEAD)
(Contact us)
$NetBSD: query-full-pr,v 1.39 2013/11/01 18:47:49 spz Exp $
$NetBSD: gnats_config.sh,v 1.8 2006/05/07 09:23:38 tsutsui Exp $
Copyright © 1994-2007
The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.