[OpenWrt-Devel] [PATCH] base-files: add network_get_metric() to /lib/functions/network.sh

Hans Dedecker dedeckeh at gmail.com
Tue Sep 25 04:19:24 EDT 2018


On Mon, Sep 24, 2018 at 2:31 PM Florian Eckert <fe at dev.tdt.de> wrote:
>
> Signed-off-by: Florian Eckert <fe at dev.tdt.de>
Patch applied to master
(https://git.openwrt.org/?p=openwrt/openwrt.git;a=commit;h=61a59949009993a6b1d634ecbce765b37c4c2560);
thx

Hans
> ---
>  package/base-files/files/lib/functions/network.sh | 5 +++++
>  1 file changed, 5 insertions(+)
>
> diff --git a/package/base-files/files/lib/functions/network.sh b/package/base-files/files/lib/functions/network.sh
> index d7fd2dea57..4fdcb66302 100644
> --- a/package/base-files/files/lib/functions/network.sh
> +++ b/package/base-files/files/lib/functions/network.sh
> @@ -271,6 +271,11 @@ network_is_up()
>  # 2: interface
>  network_get_protocol() { __network_ifstatus "$1" "$2" ".proto"; }
>
> +# determine the metric of the given logical interface
> +# 1: destination variable
> +# 2: interface
> +network_get_metric() { __network_ifstatus "$1" "$2" ".metric"; }
> +
>  # determine the layer 3 linux network device of the given logical interface
>  # 1: destination variable
>  # 2: interface
> --
> 2.11.0
>
>
> _______________________________________________
> openwrt-devel mailing list
> openwrt-devel at lists.openwrt.org
> https://lists.openwrt.org/mailman/listinfo/openwrt-devel

_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel



More information about the openwrt-devel mailing list