Created attachment 451377 [details] patch Hello, dhcpd/dhclient in Fedora-14 have had support for RFC 3442 implemented since version 4.2.0-4.fc14. See bug #516325. It's my unofficial implementation but I hope upstream will ever implement it in a similar way. I was looking into NM to see how much work it would take to add a support for RFC 3442 to NM and discovered that it's actually already there but for arbitrary format: option rfc3442-classless-static-routes code 121 = array of unsigned integer 8; see https://lists.isc.org/pipermail/dhcp-users/2008-December/007629.html My format looks like: option classless-static-routes = array of (destination-descriptor ip-address); I'm adding a tiny patch, that adds a support for my format of classless-static-route option, which I hope is same/similar as the official one will be once the upstream implement the RFC 3442. I have been testing it and it works great. thanks, Jiri
Created attachment 453725 [details] simpler patch Actually the if (tmp > 0) - addr_len = ((tmp - 1) / 8) + 1; + addr_len = (tmp + 7) / 8; change is not needed because of the 'if (tmp > 0)' condition.
Given the example from the code: 0 192.168.0.113 25.129.210.177.132 192.168.0.113 7.2 10.34.255.6 what route should that actually be? Can you break this down for me a bit more? I can't quite seem to match up the above bits with the examples I have already when I'm writing the testcases. Thanks!
Oh yeah, this example is 'just an example'. I should have put there something making more sense. Anyway this string "0 192.168.0.113 25.129.210.177.132 192.168.0.113 7.2 10.34.255.6" is array of 3 routes (destination-descriptor router's-ip-address) dest.descriptor | router -------------------+---------------- 0 | 192.168.0.113 25.129.210.177.132 | 192.168.0.113 7.2 | 10.34.255.6 - the first line means that the default (destination 0.0.0.0/0) router is 192.168.0.113 - the second line means that there's a route with destination 129.210.177.128/25 and router address 192.168.0.113. This one is example taken from RFC3442: 'For example, if the server sends a route with a destination of 129.210.177.132 and a subnet mask of 255.255.255.128, the client will install a route with a destination of 129.210.177.128.' - the third line means that there's a route with destination 2.0.0.0/7 and router address 10.34.255.6 So after the binding the 'ip route show' on client's machine shows: 129.210.177.128/25 via 192.168.0.113 dev eth0 proto static 2.0.0.0/7 via 10.34.255.6 dev eth0 proto static default via 192.168.0.113 dev eth0 proto static Did I answer your question ?
Yeah, you did, thanks. Reworked and pushed to git. I had to rewrite a bunch of the code to be able to do more complete unit testing of the DHCP RFC3442 route parsing. 8b006f331dc28f61cf063b2e8415305041e0ca7c (master) 59b65bb1240b0b15c423fe8926bb34876bdd6847 (0.8.x) thanks!
NetworkManager-0.8.3.995-1.fc14 has been submitted as an update for Fedora 14. https://admin.fedoraproject.org/updates/NetworkManager-0.8.3.995-1.fc14
NetworkManager-0.8.3.995-1.fc13 has been submitted as an update for Fedora 13. https://admin.fedoraproject.org/updates/NetworkManager-0.8.3.995-1.fc13
NetworkManager-0.8.3.995-1.fc14 has been pushed to the Fedora 14 testing repository. If problems still persist, please make note of it in this bug report. If you want to test the update, you can install it with su -c 'yum --enablerepo=updates-testing update NetworkManager'. You can provide feedback for this update here: https://admin.fedoraproject.org/updates/NetworkManager-0.8.3.995-1.fc14
*** Bug 642596 has been marked as a duplicate of this bug. ***
*** Bug 641598 has been marked as a duplicate of this bug. ***
Package NetworkManager-0.8.3.996-1.fc14: * should fix your issue, * was pushed to the Fedora 14 updates-testing repository, * should be available at your local mirror within two days. Update it with: # su -c 'yum update --enablerepo=updates-testing NetworkManager-0.8.3.996-1.fc14' as soon as you are able to, then reboot. Please go to the following url: https://admin.fedoraproject.org/updates/NetworkManager-0.8.3.996-1.fc14 then log in and leave karma (feedback).
Package NetworkManager-0.8.3.996-1.fc13: * should fix your issue, * was pushed to the Fedora 13 updates-testing repository, * should be available at your local mirror within two days. Update it with: # su -c 'yum update --enablerepo=updates-testing NetworkManager-0.8.3.996-1.fc13' as soon as you are able to, then reboot. Please go to the following url: https://admin.fedoraproject.org/updates/NetworkManager-0.8.3.996-1.fc13 then log in and leave karma (feedback).
NetworkManager-0.8.3.996-1.fc14 has been pushed to the Fedora 14 stable repository. If problems still persist, please make note of it in this bug report.
Package NetworkManager-0.8.3.997-1.fc13: * should fix your issue, * was pushed to the Fedora 13 updates-testing repository, * should be available at your local mirror within two days. Update it with: # su -c 'yum update --enablerepo=updates-testing NetworkManager-0.8.3.997-1.fc13' as soon as you are able to, then reboot. Please go to the following url: https://admin.fedoraproject.org/updates/NetworkManager-0.8.3.997-1.fc13 then log in and leave karma (feedback).
NetworkManager-0.8.3.998-2.fc13 has been submitted as an update for Fedora 13. https://admin.fedoraproject.org/updates/NetworkManager-0.8.3.998-2.fc13
NetworkManager-0.8.3.998-2.fc13 has been pushed to the Fedora 13 stable repository. If problems still persist, please make note of it in this bug report.