On 12/06/2017 12:40 AM, Roman Yeryomin wrote:
> On 2017-12-05 21:52, Hans Dedecker wrote:
>> On Tue, Dec 5, 2017 at 5:22 PM, Roman Yeryomin <ro...@advem.lv> wrote:
>>> It's better not to configure ifname separately since they
>>> are tied together.
>>>
>>> Signed-off-by: Roman Yeryomin <ro...@advem.lv>
>>> ---
>>>  package/base-files/files/bin/config_generate | 2 +-
>>>  1 file changed, 1 insertion(+), 1 deletion(-)
>>>
>>> diff --git a/package/base-files/files/bin/config_generate
>>> b/package/base-files/files/bin/config_generate
>>> index a8311fc595..d7a6829d77 100755
>>> --- a/package/base-files/files/bin/config_generate
>>> +++ b/package/base-files/files/bin/config_generate
>>> @@ -113,7 +113,7 @@ generate_network() {
>>>                                 set network.$1.proto='dhcp'
>>>                                 delete network.${1}6
>>>                                 set network.${1}6='interface'
>>> -                               set network.${1}6.ifname='$ifname'
>>> +                               set network.${1}6.ifname='@${1}'
>>>                                 set network.${1}6.proto='dhcpv6'
>>>                         EOF
>>>                 ;;
>>> -- 
>>> 2.14.1
>> NACK
>>
>> This makes the IPv6 interface dependant on the operational status of
>> the IPv4 interface; meaning the IPv6 interface will not be started if
>> the IPv4 interface does not get an IP address.
>> Especially this would break wan connectivity if the  wan link only
>> supports IPv6
>>
> 
> Hmm... right, will just ${1} be better?
> 
> Regards,
> Roman

No, there is no real interface called 'wan', so it will simply not work at
all. Logical netifd interface names can only be used in alias
configurations, but aliases always add a depenency on the 'up' state of the
aliased interface (so aliases are mostly useful for interfaces that
actually depend on each other, like a interface depending on a lower interface.

If you want two configurations not to depend on each other, as we usually
want for IPv4/IPv6 setup, the current version '$ifname' is exactly right.
It is also the clearest solution semantically: IPv4 and IPv6 uplink are two
independent configurations that just share the same physical link in the
most common setups.

Regards,
Matthias

Attachment: signature.asc
Description: OpenPGP digital signature

_______________________________________________
Lede-dev mailing list
Lede-dev@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/lede-dev

Reply via email to