CVSROOT:        /cvs
Module name:    src
Changes by:     flor...@cvs.openbsd.org 2024/09/16 01:34:49

Modified files:
        sbin/dhcpleased: frontend.c 

Log message:
Close correct file descriptor.

Instead of closing the just received UDP socket we closed the imsg fd
thus cleanly shutting down dhcpleased(8).

Problem triggered by sf@ with something like
while :; do ifconfig vio0 -inet; done
while :; do ifconfig vio0 inet autoconf; done

The problem triggers when dhcpleased configured a lease and in just
the right moment the autoconf flag gets removed. The main process
opens a udp socket and sends it to the frontend. At the same time the
frontend learned (from the route socket), that the interface lost its
autoconf flag. When the frontend then receives the udp socket via fd
passing it tries to close it. Due to a typo it would instead close the
imsg file descriptor.

Found by me after lots of head scratching.
OK tb

Reply via email to