Re: dhcpcd does not remove DNS information with -x
Drew Morgan
Fri Jul 03 20:00:09 2015
Okay, thank you.
You should know the source of my confusion: The man page here[1]
states that -x de-configures the interface and exits.
Thanks again,
Drew
[1] http://roy.marples.name/man/html8/dhcpcd.html
On Fri, Jul 3, 2015 at 2:06 PM, Roy Marples <roy@xxxxxxxxxxxx> wrote:
> Hi Drew
>
> On Friday 03 July 2015 11:50:27 Drew Morgan wrote:
>> I'm experiencing some unexpected behavior with dhcpcd. In particular,
>> DNS information doesn't seem to be properly cleared when an interface
>> is de-configured. As an example, consider the following two sequences:
>>
>> (assume wlan0 is up and associated with an access point)
>>
>> # resolvconf -l
>> (empty)
>> # dhcpcd wlan0
>> ... (lease acquired)
>> # resolvconf -l
>> (shows dns information for wlan0.dhcp)
>> # dhcpcd -k wlan0
>> ... (lease released, dhcpcd shut down)
>> # resolvconf -l
>> (empty)
>>
>> contrasted with the following, where dhcpcd -k is replaced with dhcpcd -x:
>>
>> # resolvconf -l
>> (empty)
>> # dhcpcd wlan0
>> ... (lease acquired)
>> # resolvconf -l
>> (shows dns information for wlan0.dhcp)
>> # dhcpcd -x wlan0
>> ... (dhcpcd shut down)
>> # resolvconf -l
>> (shows dns information for wlan0.dhcp)
>>
>> In other words, something about the -x shutdown procedures seems to be
>> skipping the `resolvconf -d wlan0.dhcp' command from the
>> 20-resolv.conf hook.
>>
>> This is definitely unexpected behavior to me, since I expect
>> de-configuring an interface to include removing DNS information from
>> resolv.conf. This difference can even cause real problems, eg when the
>> wlan0 DNS servers aren't publicly addressable, but resolvconf ends up
>> giving them higher priority over DNS information from a different
>> interface anyway.
>>
>> Is this a bug in dhcpcd, or am I misunderstanding what the -x command
>> should be doing?
>
> You are misunderstanding the command line
> -x simply means exit - everything configured is still configured
> -k means de-configure the interface (also releases the lease back to the server
> for another user)
>
> Roy
>
Archive administrator: postmaster@marples.name