[PATCH] Clear peer_addr if aborting XML POST changes the hostname

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



peer_addr needs to be reset if the host changes, or else we will connect
to the wrong host, and probably trigger a certificate mismatch.

References:

Commit d9aa66ba2d (Clear cached peer_addr where necessary)
http://lists.infradead.org/pipermail/openconnect-devel/2013-August/001136.html

Signed-off-by: Kevin Cernekee <cernekee at gmail.com>
---
 http.c |    2 ++
 1 file changed, 2 insertions(+)

diff --git a/http.c b/http.c
index 5adacaa..001c6a0 100644
--- a/http.c
+++ b/http.c
@@ -1048,6 +1048,8 @@ int openconnect_obtain_cookie(struct openconnect_info *vpninfo)
 					orig_host = NULL;
 					free(vpninfo->urlpath);
 					vpninfo->urlpath = orig_path;
+					free(vpninfo->peer_addr);
+					vpninfo->peer_addr = NULL;
 					orig_path = NULL;
 					vpninfo->port = orig_port;
 				}
-- 
1.7.9.5




[Index of Archives]     [Linux Samsung SoC]     [Linux Rockchip SoC]     [Linux Actions SoC]     [Linux for Synopsys ARC Processors]     [Linux NFS]     [Linux NILFS]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]


  Powered by Linux