Hi,
I have briefly reviewed this patch. If you look at each get_interface_metric()
call you'll notice exactly the same repeating pattern:
tap_metric_v4 = get_interface_metric(index, AF_INET, &is_auto);
if (is_auto)
{
tap_metric_v4 = 0;
}
tap_metric_v6 = get_interface_metric(index, AF_INET6, &is_auto);
if (is_auto)
{
tap_metric_v6 = 0;
}
Should the get_interface_metric() be rewritten to return:
0 = automatic metric
n = manual metric
-1 = error
...all the get_interface_metric() would simplify to:
tap_metric_v4 = get_interface_metric(index, AF_INET);
tap_metric_v6 = get_interface_metric(index, AF_INET6);
Just a suggestion.
Best regards,
Simon
------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Openvpn-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/openvpn-devel