From 02541ce1da6dfad78694aba74c0bf677a8ba54e4 Mon Sep 17 00:00:00 2001
From: basil00
Date: Sat, 6 Jul 2019 08:23:06 +0800
Subject: [PATCH] WinDivert 2.0.1-rc bugfix release.
---
CHANGELOG | 6 ++++++
VERSION | 2 +-
dll/windivert.def | 2 ++
dll/windivert_helper.c | 9 +++++++++
doc/windivert.html | 16 ++++++++--------
include/windivert.h | 10 ++++++++++
6 files changed, 36 insertions(+), 9 deletions(-)
diff --git a/CHANGELOG b/CHANGELOG
index 127f5b7..7ee21d1 100644
--- a/CHANGELOG
+++ b/CHANGELOG
@@ -291,3 +291,9 @@ WinDivert 2.0.0-rc
values correspond to higher priorities.
- The last two arguments for WinDivertRecv() and WinDivertSend() have been
swapped.
+WinDivert 2.0.1-rc
+ - Fix WFP callout install optimization bug.
+ - Fix WinDivertHelperNtohIpv6Address/WinDivertHelperHtonIpv6Address bug.
+ - Rename the following functions for consistency:
+ * WinDivertHelperNtohIpv6Address -> WinDivertHelperNtohIPv6Address
+ * WinDivertHelperHtonIpv6Address -> WinDivertHelperHtonIPv6Address
diff --git a/VERSION b/VERSION
index b50fd54..45e0a92 100644
--- a/VERSION
+++ b/VERSION
@@ -1 +1 @@
-2.0.0-rc
+2.0.1-rc
diff --git a/dll/windivert.def b/dll/windivert.def
index 5f9e485..2c2ecc7 100644
--- a/dll/windivert.def
+++ b/dll/windivert.def
@@ -28,3 +28,5 @@ EXPORTS
WinDivertHelperHtonll
WinDivertHelperNtohIPv6Address
WinDivertHelperHtonIPv6Address
+ WinDivertHelperNtohIpv6Address
+ WinDivertHelperHtonIpv6Address
diff --git a/dll/windivert_helper.c b/dll/windivert_helper.c
index a619872..0b91cc6 100644
--- a/dll/windivert_helper.c
+++ b/dll/windivert_helper.c
@@ -5055,3 +5055,12 @@ extern void WinDivertHelperHtonIPv6Address(const UINT *inAddr, UINT *outAddr)
WinDivertByteSwap128(inAddr, outAddr);
}
+// Old names to be removed in next version
+extern void WinDivertHelperNtohIpv6Address(const UINT *inAddr, UINT *outAddr)
+{
+ WinDivertByteSwap128(inAddr, outAddr);
+}
+extern void WinDivertHelperHtonIpv6Address(const UINT *inAddr, UINT *outAddr)
+{
+ WinDivertByteSwap128(inAddr, outAddr);
+}
diff --git a/doc/windivert.html b/doc/windivert.html
index 23e69c6..d5a8ce0 100644
--- a/doc/windivert.html
+++ b/doc/windivert.html
@@ -2299,7 +2299,7 @@ Parses an IPv6 address stored in addrStr.
If pAddr is non-NULL, the buffer assumed
to be large enough to hold a 16-byte IPv6 address.
The result is stored in host-byte-order.
-Use WinDivertHelperHtonIpv6Address()
+Use WinDivertHelperHtonIPv6Address()
to convert the result into network-byte-order.
@@ -2591,7 +2591,7 @@ UINT32 WinDivertHelperNtohl(
UINT64 WinDivertHelperNtohll(
__in UINT64 x
);
-void WinDivertHelperNtohIpv6Address(
+void WinDivertHelperNtohIPv6Address(
__in const UINT *inAddr,
__out UINT *outAddr
);
@@ -2626,7 +2626,7 @@ UINT32 WinDivertHelperHtonl(
UINT64 WinDivertHelperHtonll(
__in UINT64 x
);
-void WinDivertHelperHtonIpv6Address(
+void WinDivertHelperHtonIPv6Address(
__in const UINT *inAddr,
__out UINT *outAddr
);
@@ -2849,11 +2849,11 @@ The possible macros are:
for the SOCKET layer, or
WINDIVERT_EVENT_REFLECT_CLOSE for the REFLECT
layer.
-NETWORK | | | | | ✔ | WINDIVERT_LAYER_FLOW_NETWORK |
-NETWORK_FORWARD | | | | | ✔ | WINDIVERT_LAYER_FLOW_NETWORK_FORWARD |
-FLOW | | | | | ✔ | WINDIVERT_LAYER_FLOW_FLOW |
-SOCKET | | | | | ✔ | WINDIVERT_LAYER_FLOW_SOCKET |
-REFLECT | | | | | ✔ | WINDIVERT_LAYER_FLOW_REFLECT |
+NETWORK | | | | | ✔ | WINDIVERT_LAYER_NETWORK |
+NETWORK_FORWARD | | | | | ✔ | WINDIVERT_LAYER_NETWORK_FORWARD |
+FLOW | | | | | ✔ | WINDIVERT_LAYER_FLOW |
+SOCKET | | | | | ✔ | WINDIVERT_LAYER_SOCKET |
+REFLECT | | | | | ✔ | WINDIVERT_LAYER_REFLECT |
diff --git a/include/windivert.h b/include/windivert.h
index 14811fc..6407d76 100644
--- a/include/windivert.h
+++ b/include/windivert.h
@@ -610,6 +610,16 @@ extern WINDIVERTEXPORT void WinDivertHelperHtonIPv6Address(
__in const UINT *inAddr,
__out UINT *outAddr);
+/*
+ * Old names to be removed in the next version.
+ */
+extern WINDIVERTEXPORT void WinDivertHelperNtohIpv6Address(
+ __in const UINT *inAddr,
+ __out UINT *outAddr);
+extern WINDIVERTEXPORT void WinDivertHelperHtonIpv6Address(
+ __in const UINT *inAddr,
+ __out UINT *outAddr);
+
#endif /* WINDIVERT_KERNEL */
#ifdef __cplusplus