Hi,

Do we also need to drop the route within dhcp_lease_lost()?

Thanks

On Fri, Mar 21, 2014 at 7:23 PM, Tom Gundersen <t...@jklm.no> wrote:
> On Thu, Mar 20, 2014 at 7:53 PM, Brandon Philips <bran...@ifup.co> wrote:
>> This is a better approach that was suggested by Mike and ack'd by Tom.
>>
>> Some DHCP servers gives you a netmask of 255.255.255.255 so the gateway is 
>> not
>> routable. Other DHCP client implementations look through the existing routes 
>> to
>> figure out if they should add an explicit host route. See below for a link.
>>
>> However, it makes sense to just create the route explicitly whether it is
>> needed or not since it is explicit, makes the dhcp route entries independent 
>> of
>> other entries and saves us from knowing the state of the kernel tables.
>>
>> After patch route table on a machine with a network (common case):
>>
>> default via 10.0.2.2 dev ens3
>> 10.0.2.0/24 dev ens3  proto kernel  scope link  src 10.0.2.15
>> 10.0.2.2 dev ens3  scope link
>>
>> After patch route table on a machine without a network (this case):
>>
>> default via 10.240.0.1 dev ens4v1
>> 10.240.0.1 dev ens4v1  scope link
>>
>> The code from dhcpcd that works around this issue is on line 637.
>> https://android.googlesource.com/platform/external/dhcpcd/+/master/configure.c
>
> Applied. Thanks a lot for doing this work!
>
> Cheers,
>
> Tom
> _______________________________________________
> systemd-devel mailing list
> systemd-devel@lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/systemd-devel
_______________________________________________
systemd-devel mailing list
systemd-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/systemd-devel

Reply via email to