base-files: fix ucidef_set_interface() protocol selection
authorJo-Philipp Wich <jo@mein.io>
Fri, 25 May 2018 05:28:28 +0000 (07:28 +0200)
committerJo-Philipp Wich <jo@mein.io>
Tue, 18 Dec 2018 16:32:19 +0000 (17:32 +0100)
commit3cd9da0c441106a0f7c9063e49b72203495665b2
tree7c36043ea6700968dac2cb7ecc421fe1f27a77cd
parent74dab5296643b9dab690bfce95886240d8571f2b
base-files: fix ucidef_set_interface() protocol selection

The previous refactoring of ucidef_set_interface() removed the protocol
selection heuristic which breaks the networking defaults for the majority
of boards.

Re-add the protocol selection and rename two bad "proto" references to
the expected "protocol" value.

Fixes: 85048a9c1f ("base-files: rework _ucidef_set_interface to be more generic")
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
(backported from 7e664b7c2dc00006ba29bf947cf177b5bccdc47d)
package/base-files/files/lib/functions/uci-defaults.sh