dhcpcd-discuss

Re: Re: Issues with static configuration: routers

Yegor Yefremov

Tue Mar 27 06:48:19 2018

Hi Roy,

On Fri, Jan 19, 2018 at 8:11 PM, Roy Marples <roy@xxxxxxxxxxxx> wrote:
> Hi Yegor
>
> On 18/01/2018 14:44, Yegor Yefremov wrote:
>>
>> On Wed, Jan 17, 2018 at 10:08 AM, Yegor Yefremov
>> <yegorslists@xxxxxxxxxxxxxx> wrote:
>>>
>>> I'm using the latest git version and have following problem when
>>> trying to set the default gateway. The command below complains, that I
>>> don't specify an interface though it is present on the command line:
>>>
>>> # dhcpcd -S ip_address=192.168.1.233/24 -S
>>> domain_name_servers="192.168.1.1 192.
>>> 168.1.3" -S broadcast_address=192.168.1.255 -S routers=192.168.1.1 eth0
>>> static routes require an interface
>>>
>>> I was working with dhcpcd version 6.x before and the router made no
>>> problem. Am I missing some configuration option?
>>
>>
>> I've looked at the code and found following:
>>
>> The first invocation of add_options() will be made with NULL instead
>> of ifname [1]. This leads to return value -1, as neither ifname nor
>> ctx->ifaces are available.
>>
>> [1] https://github.com/rsmarples/dhcpcd/blob/master/src/dhcpcd.c#L1548
>
>
> I added the interface requirement here:
> https://roy.marples.name/git/dhcpcd.git/commit/src/if-options.c?id=f96eff45c257a7d70b6412db8ccf8c6bb5666839
>
> Don't crash when --static routers= is given on the command line.
> T116 will make it work for the control socket.
>
> Sadly my MySQL instance for Phabricator is still hosed so I get any more
> detail about this right now.
>
> I'll try and spend some time reverting the changeset and seeing where it
> crashes and try and find an alternative implementation.
> Unsure how long this will take though, so if you have an idea, patches
> welcome.

Could you already have a look at this issue?

I've played with moving interface enumeration up, but it didn't help a lot.

Thanks.

Regards,
Yegor

Follow-Ups:
Re: Re: Issues with static configuration: routersRoy Marples
References:
Issues with static configuration: routersYegor Yefremov
Re: Issues with static configuration: routersYegor Yefremov
Re: Re: Issues with static configuration: routersRoy Marples
Archive administrator: postmaster@marples.name