Re: Dhcpcd and UDP port 68 (bootp client)
Roy Marples
Mon Sep 01 16:40:51 2014
On 2014-09-01 15:38, Roy Marples wrote:
Hi
On 2014-08-31 19:50, Leonid Isaev wrote:
[ This ia a curiosity question really, not a complaint ]
I am using dhcpcd on a ipv4-only network, and of course, when dhcpcd
starts it
listens on the UDP port 68 (being a bootp client as well).
Specifically, it
does so on a wildcard address, i.e. *:68 as shown by ss(8).
However, after the 1st lease renewal, ss(8) also shows that dhcpcd
binds to the
very interface it is running on:
------
$ ss -aun
State Recv-Q Send-Q Local Address:Port Peer Address:Port
UNCONN 0 0 167.96.160.66%bond0:68 *:*
UNCONN 0 0 *:68 *:*
$ pgrep -af dhcpcd
502 /usr/bin/dhcpcd -4dB -t 0 bond0
------
This happens only on my university network, and does not occur on my
simple
home LAN (dhcp server is dnsmasq).
So, why does dhcpcd not bind to the interface right from the start,
but rather
after renewing the lease? I am also attaching the relevant fragment of
the log
file...
Basically it binds to the address on the interface to send renews AFTER
it has obtained a lease.
This should be re-written to use sendmsg to specify the from address
instead of binding
as it currently does.
This is resolved here:
http://roy.marples.name/projects/dhcpcd/ci/dd2b09410dd487de2de4e47f1a3ceea3fb32fed2?sbs=0
Roy
Archive administrator: postmaster@marples.name