Subject: bin/23705: ntpd can not be restricted to certain interfaces
To: None <gnats-bugs@gnats.NetBSD.org>
From: Martin Husemann <martin@duskware.de>
List: netbsd-bugs
Date: 12/10/2003 10:32:44
>Number:         23705
>Category:       bin
>Synopsis:       ntpd can not be restricted to certain interfaces
>Confidential:   no
>Severity:       critical
>Priority:       high
>Responsible:    bin-bug-people
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Wed Dec 10 09:33:00 UTC 2003
>Closed-Date:
>Last-Modified:
>Originator:     Martin Husemann
>Release:        NetBSD 1.6ZG
>Organization:
>Environment:
System: NetBSD night-porter.duskware.de 1.6ZG NetBSD 1.6ZG (PORTER) #5: Sun Dec 7 11:32:49 CET 2003 martin@night-porter.duskware.de:/usr/src/sys/arch/i386/compile/PORTER i386
Architecture: i386
Machine: i386
>Description:

(Note: this could be filed as a change-request/medium, but since the missing
feature triggers a bug I made it more severe)

I have multiple interfaces with the same address: hme0 connects to my local
lan and gre0 tunnels to work. When starting ntpd it tries to bind a socket
to both interfaces, and since they share the same address it fails on the
second one:

ntpd[333]: bind() fd 9, family 2, port 123, addr 192.168.150.10, in_classd=0 flags=0 fails: Address already in use

This is anoying.

But the real problem is: apparently there is *no* way to configure ntpd to
only bind to certain addresses or interfaces, or it is so well hidden in the 
documentation that I didn't find it. For example dhcpd handles this pretty
well - you can either list interfaces on the command line or put subnet
declarations in it's config file.

Of course I don't want ntpd to listen on the gre0, so being able to restrict
it to hme0 and wi0 would make the above problem go away.

>How-To-Repeat:
s/a
>Fix:
n/a
>Release-Note:
>Audit-Trail:
>Unformatted: