Fix the comparison of pull options hash on restart
PATCH 1/1 Fix the comparison of pull options hash on restart
Signed-off-by Selva Nair <[email protected]...>
--- src/openvpn/init.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
src/openvpn/init.c +1 -1
@@ -1717,7 +1717,7 @@ options_hash_changed_or_zero(const struct md5_digest *a, {const struct md5_digest zero = {{0 }};return memcmp (a, b,sizeof (struct md5_digest )) || -memcmp (a, &zero,sizeof (struct md5_digest )); + !memcmp (a, &zero,sizeof (struct md5_digest )); }#endif /* P2MP */
Signature · 1 line
1.7.10.4
Quoted 10 lines · Selva Nair
Signed-off-by Selva Nair <[email protected]...>--- src/openvpn/init.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)src/openvpn/init.c +0
-0
src/openvpn/init.c options_hash_changed_or_zero(const struct md5_digest *a, · line 1722
Quoted 7 lines
src/openvpn/init.c +1
-1@@ -1717,7 +1717,7 @@ options_hash_changed_or_zero(const struct md5_digest *a, {const struct md5_digest zero = {{0 }};return memcmp (a, b,sizeof (struct md5_digest )) || -memcmp (a, &zero,sizeof (struct md5_digest )); + !memcmp (a, &zero,sizeof (struct md5_digest )); }#endif /* P2MP */
ACK, this is clearly how it was intended, and how the code behaved before 827de237.
Sorry for breaking this. A clear example why we need more (unit) tests...
-Steffan
Your patch has been applied to the master branch.
commit 1899393543caa3cd5191c96176e8ecaa8e690eeb
Author: Selva Nair Date: Sat Jun 4 00:57:43 2016 -0400
Fix the comparison of pull options hash on restart
Signed-off-by: Selva Nair <[email protected]...>
Acked-by: Steffan Karger <[email protected]...>
Message-Id: <[email protected]...>
URL: http://article.gmane.org/gmane.network.openvpn.devel/11783
Signed-off-by: Gert Doering <[email protected]...>--
kind regards,
Gert Doering