Subject: bin/23705: ntpd can not be restricted to certain interfaces
To: None <>
From: Martin Husemann <>
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
>Originator:     Martin Husemann
>Release:        NetBSD 1.6ZG
System: NetBSD 1.6ZG NetBSD 1.6ZG (PORTER) #5: Sun Dec 7 11:32:49 CET 2003 i386
Architecture: i386
Machine: i386

(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, 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.