1. 20
  1. 10

    Neat! I’m unable to read this name without seeing the “please” in there, much like the “meow” in “homeowner”.

    1. 8

      I’ve never seen that re: homeowner before. Thanks, I hate it. :|

    2. 2

      But why?

      There is already a dhcpclient process. What’s the use of this new one?

      1. 6

        Maybe there is more, here is what I saw on my system so far:

        • dhclient actively waits for a DHCP lease, dhcpleased does it in the background. Noticeable especially during boot since this saves you some time. YMMV, in my case boot got ~2s faster.
        • It can serve multiple interfaces at the same time, dhclient needs one process per interface.
        • It uses unveil so only the necessary parts of the file systems are visible to the 3 processes, access to all other parts is forbidden. The unprivileged process of dhclient doesn’t use unveil
        • pledge is stricter for all 3 processes compared to dhclient, especially the process that parses untrusted code input only has the ‘stdio’ pledge
        1. 3

          Another thing I forget to mention and very much like about all software written by florian@. The daemon requires no configuration at all. You start it up and it does exactly what it should without turning any knobs, writing config files, etc

        2. 2

          dhclient(8) is just that: a client process. dhcpleased(8) is a daemon that will handle all interfaces on the host that are set for auto configuration of ipv4 addresses and acquire addresses for them.

          Other platforms do similar things, one example being dhcpcd: https://wiki.archlinux.org/index.php/Dhcpcd

        3. 1

          I was giving this a shot earlier after it first entered -current snapshots and was unable to get the default IPv4 route set with the gateway from my dhcp server. This is after removing dhcp from my hostname.if and setting AUTOCONF4 on the interface. (I’m not certain if removing dhcp is correct, but /etc/netstart will still use dhclient if you specify that, and so I tried without.)

          1. 2

            You need to remove ‘dhcp’ and add ‘inet autoconf’ to your /etc/hostname.if file. Then the system uses dhcpleased. If ‘dhcp’ is present, dhclient will be started

            1. 1

              Perhaps lobsters is not the best place to report bugs.. but I did both of these and it was still not setting the route. Currently on:

              kern.version=OpenBSD 6.9-beta (GENERIC.MP) #368: Sun Feb 28 21:10:13 MST 2021
                  deraadt@amd64.openbsd.org:/usr/src/sys/arch/amd64/compile/GENERIC.MP
              

              When I up the interface, I see logged:

              Mar  1 09:13:02 drifter dhcpleased[73796]: failed to send route message: No such process
              Mar  1 09:13:06 drifter dhcpleased[73796]: failed to send route message: Network is unreachable
              

              Even stranger is that I cannot manually add the route anymore.

              # route add default 10.0.0.1
              add net default: gateway 10.0.0.1: Network is unreachable
              

              e: just saw this, and latest snap i’m on isn’t build with this commit yet: https://marc.info/?l=openbsd-cvs&m=161458351925096&w=2