]> 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:28:27 +0000 (15:28 +0100)
commit92b4c0e96f797775df18269bc7295dc163688cb4
tree573a8364347d912b0de6b531e610606df62d206e
parentd04032c3f236cf7c726d6b162686bcb71fda2e15
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>
(cherry picked from commit 4229243563bcb22990f71d50e25be9ea6d44f519)
src/openvpn/block_dns.c
src/openvpn/block_dns.h
src/openvpn/win32.c
src/openvpnserv/interactive.c