]> git.ipfire.org Git - thirdparty/openvpn.git/commit
Refactor get_interface_metric to return metric and auto flag separately
authorSelva Nair <selva.nair@gmail.com>
Wed, 6 Dec 2017 04:28:41 +0000 (23:28 -0500)
committerGert Doering <gert@greenie.muc.de>
Thu, 25 Jan 2018 14:25:36 +0000 (15:25 +0100)
commit4229243563bcb22990f71d50e25be9ea6d44f519
treee8910159450b40667a7cf88c59e4acae580ed982
parentd59a1c2f488cc3f4725df1e053592d53c30cf0eb
Refactor get_interface_metric to return metric and auto flag separately

- Instead of returning metric = 0 when automatic metric is in use
  return the actual metric and flag automatic metric through a
  parameter. This makes the function reusable elsewhere.

- Ensure return value can be correctly cast to int and return -1 on
  error.

Signed-off-by: Selva Nair <selva.nair@gmail.com>
Acked-by: Simon Rozman <simon@rozman.si>
Message-Id: <1512534521-14760-1-git-send-email-selva.nair@gmail.com>
URL: https://www.mail-archive.com/openvpn-devel@lists.sourceforge.net/msg16039.html
Signed-off-by: Gert Doering <gert@greenie.muc.de>
src/openvpn/block_dns.c
src/openvpn/block_dns.h
src/openvpn/win32.c
src/openvpnserv/interactive.c