[Bug 266508] dhclient sends renew through wrong interface

From: <bugzilla-noreply_at_freebsd.org>
Date: Mon, 19 Sep 2022 21:53:57 UTC
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=266508

            Bug ID: 266508
           Summary: dhclient sends renew through wrong interface
           Product: Base System
           Version: CURRENT
          Hardware: Any
                OS: Any
            Status: New
          Severity: Affects Some People
          Priority: ---
         Component: bin
          Assignee: bugs@FreeBSD.org
          Reporter: flole@flole.de

When using dhclient in a multi-wan environment it sends the renew unicast
requests through the wrong interface.

An example config is this:

eth0.1: 192.168.1.1/24
eth0.2: 192.168.2.1/24

default gateway: 192.168.1.254/24
dhcp server for both interfaces: 1.2.3.4

In this case dhclient always sends out the requests through eth0.1 to the dhcp
server, even a renew for eth0.2. I don't know if it's possible to properly fix
this as the system doesn't know which gateway to use to reach the dhcp server
through eth0.2. If not I suggest to add an option to not send out unicast
requests at all but send out broadcasts only which can be enabled in this case,
or an option to save the from-MAC-address of the initial response and then
blindly send back to that MAC address without even caring about the routing
table. Or maybe an option to override the destination MAC for the unicast
requests, with 00:00:00:00:00:00 being used to disable the feature and
ff:ff:ff:ff:ff:ff obviously being used for broadcasting, and any other MAC is
just blindly copied in case someone wants to manually specify the gateway MAC
there.

-- 
You are receiving this mail because:
You are the assignee for the bug.