Bug 800561
Summary: | dhclient fails to bind to interface when releasing lease. | ||||||
---|---|---|---|---|---|---|---|
Product: | [Fedora] Fedora | Reporter: | Ben Greear <greearb> | ||||
Component: | dhcp | Assignee: | Jiri Popelka <jpopelka> | ||||
Status: | CLOSED ERRATA | QA Contact: | Fedora Extras Quality Assurance <extras-qa> | ||||
Severity: | medium | Docs Contact: | |||||
Priority: | medium | ||||||
Version: | rawhide | CC: | jpopelka, ovasik | ||||
Target Milestone: | --- | Keywords: | FutureFeature, Reopened | ||||
Target Release: | --- | ||||||
Hardware: | All | ||||||
OS: | Linux | ||||||
Whiteboard: | |||||||
Fixed In Version: | dhcp-4.3.1-12.fc21 | Doc Type: | Enhancement | ||||
Doc Text: | Story Points: | --- | |||||
Clone Of: | Environment: | ||||||
Last Closed: | 2015-02-23 23:25:04 UTC | Type: | --- | ||||
Regression: | --- | Mount Type: | --- | ||||
Documentation: | --- | CRM: | |||||
Verified Versions: | Category: | --- | |||||
oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |||||
Cloudforms Team: | --- | Target Upstream Version: | |||||
Embargoed: | |||||||
Attachments: |
|
Description
Ben Greear
2012-03-06 17:56:20 UTC
Created attachment 568023 [details]
Patch to allow dhclient to bind to interface when releasing lease.
F14 is EOL, please change product version to some newer Fedora, if you experience the issue there. F14 is the last version with a functional gnome, but I digress. I tested on F16 today, and the problem happens there as well, so changing this bug to be against F16. Thanks for the patch, however I'm not sure I understand how this could be reproduced (probably something like 'dhclient -r' ?) and what's the consequence of this 'packet goes out whatever the default routing table assumes is correct' problem. 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. And yes, it is the '-r' option. Here's my command line, though it need not be so complicated: ./local/sbin/dhclient -r -lf my-lease-file -cf my-conf-file -pf my-pid-file -sf lf_dhclient_script_foo.bash eth1 dhcp-4.2.3-22.P2.fc17 has been submitted as an update for Fedora 17. https://admin.fedoraproject.org/updates/dhcp-4.2.3-22.P2.fc17 Package dhcp-4.2.3-22.P2.fc17: * should fix your issue, * was pushed to the Fedora 17 testing repository, * should be available at your local mirror within two days. Update it with: # su -c 'yum update --enablerepo=updates-testing dhcp-4.2.3-22.P2.fc17' as soon as you are able to. Please go to the following url: https://admin.fedoraproject.org/updates/FEDORA-2012-4532/dhcp-4.2.3-22.P2.fc17 then log in and leave karma (feedback). dhcp-4.2.3-23.P2.fc17 has been submitted as an update for Fedora 17. https://admin.fedoraproject.org/updates/dhcp-4.2.3-23.P2.fc17 dhcp-4.2.3-24.P2.fc17 has been pushed to the Fedora 17 stable repository. If problems still persist, please make note of it in this bug report. The patch seems to cause bug #979510. I removed that patch for now (dhcp-4.2.5-15) (In reply to Ben Greear from bug #979510, comment #1) > I actually ended up re-writing the patch that causes this bug, but never > tried to push it upstream. (I find it a total pain to try to write patches > for upstream > since I never found an active upstream tree under source control). There's no publicly available repository. > For what it's worth, we've been testing the re-write for 7 months or so > and it appears to work fine. I'm sure we don't hit all possible corner > cases, however. > > Any chance you could try this version and see if it works for you? > > https://github.com/greearb/dhcp-ct What commits do you think I need to apply ? I was hoping the reporter of the bug could try our tree to see if it works in their scenario. We do all of our testing with all of those commits applied. Some of the features are performance improvements for using DHCP on systems with lots of interfaces, so they will not directly apply to this bug, but at least in my opinion they are worth considering for general use. I think it would be great if someone could create an upstream git repository that has all of the patches in RPM applied to it. We could then re-base our tree on that one and feed you nice clean git patches easily. If that is not possible, then I think you can just remove that old patch I posted (as you have already done) and we will just use our own dhcp tree for our needs. Our tree will stay on github, and we will probably rebase it on something newer than Fedora 14 some day in case others want to use it. http://pkgs.fedoraproject.org/cgit/dhcp.git/commit/?id=8e6888336caac0d91128bdae3150f7af4b4a4a11 I've applied slightly amended patch from https://community.ubnt.com/t5/EdgeMAX/WAN-dropped-DHCP-renew-fixes-it/m-p/783774 dhcp-4.3.1-12.fc21 has been submitted as an update for Fedora 21. https://admin.fedoraproject.org/updates/dhcp-4.3.1-12.fc21 Package dhcp-4.3.1-12.fc21: * should fix your issue, * was pushed to the Fedora 21 testing repository, * should be available at your local mirror within two days. Update it with: # su -c 'yum update --enablerepo=updates-testing dhcp-4.3.1-12.fc21' as soon as you are able to. Please go to the following url: https://admin.fedoraproject.org/updates/FEDORA-2015-1651/dhcp-4.3.1-12.fc21 then log in and leave karma (feedback). dhcp-4.3.1-12.fc21 has been pushed to the Fedora 21 stable repository. If problems still persist, please make note of it in this bug report. |