A problem...?

Eric S. Raymond esr at thyrsus.com
Tue Aug 7 02:28:07 UTC 2018


Paul Theodoropoulos <paul at anastrophe.com>:
> svwh.net however did respond when I asked about it.  They sent a dump of
> packets, which showed - bizarrely - that some of my queries were coming in
> to their server on port 4. Yup, 4. The rest of my queries come in properly
> on 123.

That is utterly bizarre.  

Not only have we never had a report like this, but I just checked the code
and there does not seem to be any path that makes it possible for packets to
ship on anything but port 123.

The key line is the one that reads "create_sockets(NTP_PORT);"

find . -type f -exec grep --color -nH -e NTP_PORT {} +
./build/main/pylib/magic.py:16:NTP_PORT	= 123	# included for non-unix machines 
Binary file ./build/main/pylib/magic.pyo matches
Binary file ./build/main/pylib/magic.pyc matches
./ntpd/ntp_io.c:339: *     to bind to to the interface address on NTP_PORT so that
./ntpd/ntp_io.c:340: *     all wild and specific bindings for NTP_PORT are taken by ntpd
./ntpd/ntp_io.c:405:	create_sockets(NTP_PORT);
./ntpd/ntp_io.c:1286:	new_interface_found = update_interfaces(NTP_PORT, receiver, data);
./ntpd/ntp_io.c:2549: * address by connecting a new socket to destinationaddress:NTP_PORT
./ntpd/ntp_restrict.c:272:			|| NTP_PORT == port))
./ntpd/ntp_restrict.c:299:			|| NTP_PORT == (int)port))
./ntpd/ntp_sandbox.c:214:		 * ports that allow binding to NTP_PORT with uid != 0
./ntpd/ntp_config.c:2656:		SET_PORT(&peeraddr, NTP_PORT);
./ntpd/ntp_config.c:2696:	    SET_PORT(&peeraddr, NTP_PORT);
./ntpd/ntp_config.c:3508:	SET_PORT(addr, NTP_PORT);
./ntpd/ntpd.c:822:		 * ports that allow binding to NTP_PORT with uid != 0
./ntpd/ntpd.c:1023:			    htons(NTP_PORT), 0, NULL, NULL, NULL) != kDNSServiceErr_NoError ) {
./include/ntp.h:61:#define	NTP_PORT	123	/* included for non-unix 

Could you have a bad rewrite rule in your iptables setup somewhere?
-- 
		<a href="http://www.catb.org/~esr/">Eric S. Raymond</a>

My work is funded by the Internet Civil Engineering Institute: https://icei.org
Please visit their site and donate: the civilization you save might be your own.




More information about the users mailing list