[OpenWrt-Devel] [PATCH 3/3] ppp: Unnumbered support

Hans Dedecker dedeckeh at gmail.com
Wed Jun 10 08:44:27 EDT 2015

On Wed, Jun 10, 2015 at 2:03 PM, Steven Barth <cyrus at openwrt.org> wrote:
> Thanks, I already applied the other two.
> On 10.06.2015 10:39, Hans Dedecker wrote:
>> +ppp_select_ipaddr()
>> +{
>> +     local interface="$1"
>> +     local addrs=$(uci_get "network.${interface}.ipaddr")
>> +     local netmask=$(uci_get "network.${interface}.netmask")
> Any particular reason you are reading from UCI here and do not use the
> interface status parsing via e.g. network_get_subnets from
> /lib/functions/network.sh? This would seem more clear to me and would
> avoid the awkward parsing of netmasks as well. Additionally this would
> make it work with non-static protos as well
UCI is read as network_get_subnets only returns info for active
interfaces; e.g. if the referred interface in the unnumbered parameter
is down it's not possible to install the host dependency based on the
IP address for the PPP interface.
Did not (yet) find a way to circumvent this issue.

> Cheers,
> Steven
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org

More information about the openwrt-devel mailing list