[PATCH 2/3] iphlpapi: Correct Forwarding value from GetIpStatistics(Ex)() on *BSD.

Chip Davis cdavis at codeweavers.com
Thu Dec 12 17:06:48 CST 2019


Signed-off-by: Chip Davis <cdavis at codeweavers.com>
---
 dlls/iphlpapi/ipstats.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/dlls/iphlpapi/ipstats.c b/dlls/iphlpapi/ipstats.c
index b885957d1f2..df25d6468d5 100644
--- a/dlls/iphlpapi/ipstats.c
+++ b/dlls/iphlpapi/ipstats.c
@@ -948,7 +948,8 @@ DWORD WINAPI GetIpStatisticsEx(PMIB_IPSTATS stats, DWORD family)
             return ERROR_NOT_SUPPORTED;
         }
 
-        stats->u.dwForwarding = ip_forwarding;
+        /* ip.forwarding is 0 or 1 on BSD */
+        stats->u.dwForwarding = ip_forwarding+1;
         stats->dwDefaultTTL = ip_ttl;
         stats->dwInDelivers = ip_stat.ips_delivered;
         stats->dwInHdrErrors = ip_stat.ips_badhlen + ip_stat.ips_badsum + ip_stat.ips_tooshort + ip_stat.ips_badlen;
-- 
2.24.0




More information about the wine-devel mailing list