Currently I'm running FreeBSD 2.2.6-STABLE (last world at May, 13).
Is the following a bug or expected behaviour?
Recently I've switched from bootp to isc-dhcp2.
They both listen on udp port 67, and I had the
standard entry for bootpd in my inetd.conf:
bootps dgram udp wait root /usr/libexec/bootpd bootpd
When I've finished with DHCP configuration file (dhcpd.conf),
I (as usually) commented out the string for ``bootpd'' above
in inetd.conf, killed -HUP inetd, and tried to run dhcpd.
I was unable to run it with the following diagnostic:
``Unable to bind, address already in use''.
There was no bootpd process, and even when I killed inetd itself,
the dhcpd was unable to bind to the 67 port.
1. Create a simple program which just does nothing (I called it test.sh)
and put in in /tmp:
while :; do sleep 1000; done
2. Add an entry for bootps in inetd.conf:
bootps dgram udp wait root /tmp/test.sh test.sh
(Substitute for ``bootps'' any UDP service you wish).
3. Restart inetd by killing -HUP it.
4. Send something to this port.
I used the netcat (from the ports/net) for this purpose:
echo xxxxxxxxxxxxxxx | nc -u localhost bootps
5. ``netstat -an -finet'' will show the string similar to this one:
udp 618 0 0 *.68 *.*
(Receive queue size is 618 bytes).
6. Comment the line for bootpd in /etc/inetd.conf, restart inetd.
7. Kill the test.sh process.
8. Try to bind to the port again.
You'll get the ``Address already in use'' error;
``netstat -an'' still shows the line as above (step 5).
Wait some time (what exact?) until the kernel purges the receive queue.
Thanks in advance,
Ruslan Ermilov System Administrator
ru...@ucb.crimea.ua United Commercial Bank
+380-652-247647 Simferopol, Crimea
2426679 ICQ Network, UIN
To Unsubscribe: send mail to majo...@FreeBSD.org
with "unsubscribe freebsd-questions" in the body of the message