From a68e2d41e777430e50f3b5df38b93d721a56572e Mon Sep 17 00:00:00 2001 From: Seonah Moon Date: Tue, 14 Jul 2020 17:42:42 +0900 Subject: [PATCH] Reset IP address when deinitialize vpn-service Change-Id: Ic8f6b7075154dcaa45edc6bac02b56dd7d1554e2 --- src/capi_vpn_service.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/capi_vpn_service.c b/src/capi_vpn_service.c index 86b2325..2732989 100755 --- a/src/capi_vpn_service.c +++ b/src/capi_vpn_service.c @@ -118,8 +118,12 @@ static void _vpnsvc_deinit_vpnsvc_tun_s(vpnsvc_tun_s *s) s->fd = 0; s->index = 0; + s->mtu = 0; + memset(s->name, 0, VPNSVC_VPN_IFACE_NAME_LEN); memset(s->session, 0, VPNSVC_SESSION_STRING_LEN); + memset(s->local_ip, 0, VPNSVC_IP4_STRING_LEN); + memset(s->remote_ip, 0, VPNSVC_IP4_STRING_LEN); if (s->dns_suffix) { g_free(s->dns_suffix); -- 2.7.4