aparcar / openwrt

Staging tree of Paul Spooren
Other
9 stars 1 forks source link

FS#1399 - [gre] gre.sh has a non-declared dependency on resolveip #1213

Closed aparcar closed 6 years ago

aparcar commented 6 years ago

jeffsf:

Archer C7, "stock" 17.01.4 Packages installed include

Able to manually create and use a gretap interface using ''ip'' from the command line

UCI configuration fails on config interface 'gt_1' option proto 'gretap' option ipaddr '10.11.12.2' option peeraddr '10.11.12.3' option force_link '1'

with log entries of daemon.notice netifd: gt_1 (25772): ./gre.sh: eval: line 1: resolveip: not found

This unit does not have a name server running on it, nor will it have access to one until the network is up.

''/lib/netifd/proto/gre.sh'' contains: gre_setup() { local cfg="$1" local mode="$2" local remoteip

    local ipaddr peeraddr
    json_get_vars df ipaddr peeraddr tunlink

    [ -z "$peeraddr" ] && {
            proto_notify_error "$cfg" "MISSING_PEER_ADDRESS"
            proto_block_restart "$cfg"
            exit
    }

    remoteip=$(resolveip -t 10 -4 "$peeraddr")

No dependency is on resolveip is given # opkg info gre Package: gre Version: 1-7 Depends: libc Status: install user installed Architecture: mips_24kc Installed-Time: 1519797112

Manually installing ''resolveip'' allows UCI configuration to complete.

Suggest either or both an explicit dependency on ''resolveip'' and "short-circuiting" the call if a string-literal IP address is supplied.

aparcar commented 6 years ago

jeffsf:

Thank you!!