On 2013-09-15 1:25 PM, Bastian Bittorf wrote: > * Felix Fietkau <n...@openwrt.org> [15.09.2013 12:52]: >> I probably should have written <alias> instead of alias. The alias >> section needs a name (it's considered an interface by netifd), and the >> route 'interface' option needs to point at that alias section name. > > thank you. it works like this: > > uci add network alias > uci set network.@alias[-1].interface="lan" > uci set network.@alias[-1].bla=... > ... > > uci add network route > uci set network.@route[-1].interface=cfg164d8f > uci set network.@route[-1].bla=... Bad idea. The cfg164d8f name is not guaranteed to stay constant with changes to the section, so you should name the alias section instead of relying on autogenerated names on anonymous sections.
> i have to point to the handle 'uci add $section' gives me. > what does not work is: > > uci set network.@route[-1].interface=@[-2] > > why not? Because netifd looks up names internally, it does not use the uci extended lookup syntax. > also in http://wiki.openwrt.org/doc/uci/network#aliases > there is warning for 'deprecated'. what is the better way? You can create an interface section, and use @lan as ifname. The alias syntax will stay supported though. - Felix _______________________________________________ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel