Subject: | dhclient fails to bind to interface when releasing lease |
Date: | Mon, 06 Aug 2012 12:21:55 +0200 |
To: | dhcp-bugs@isc.org |
From: | Jiri Popelka <jpopelka@redhat.com> |
Hi,
I'm forwarding a bug report from Ben Greear (greearb@candelatech.com)
Short description:
dhclient fails to bind to interface when releasing lease.
The packet instead goes out whatever the default routing table assumes
is correct.
The attached patch fixes this problem.
More details:
Suppose you have two interfaces on the same machine
on the same subnet (perhaps both running dhcp to the same DHCP server).
You can set up routing rules so that traffic from the IP
associated with one interface actually uses that interface,
and you can do things like SO_BINDTODEVICE.
DHCP actually properly binds to the interface when acquiring the lease,
and you can use a custom callback script to set up
routing rules based on the IP it acquires, etc.
But, when you release the lease, the current code does NOT bind
to the interface properly and so the release packet
for one interface may go out of another interface
that matches standard routing rules.
That other interface may not be connected to the DHCP server
and so the release fails to happen. Since release is optional,
this is not too bad of a failure, but for my case,
I want it to work properly and actually do the release when I ask it too.
The attached patch just makes it properly bind before sending the
release packet.
I've tested this and it works fine as far as I can tell.
For the original bug report see
https://bugzilla.redhat.com/show_bug.cgi?id=800561
--
Jiri
Message body is not shown because sender requested not to inline it.