Module Name:    src
Committed By:   yamaguchi
Date:           Wed May 19 02:07:21 UTC 2021

Modified Files:
        src/sys/net: if_spppsubr.c

Log Message:
Added clear of dns addresses when IPCP is closed


To generate a diff of this commit:
cvs rdiff -u -r1.244 -r1.245 src/sys/net/if_spppsubr.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/net/if_spppsubr.c
diff -u src/sys/net/if_spppsubr.c:1.244 src/sys/net/if_spppsubr.c:1.245
--- src/sys/net/if_spppsubr.c:1.244	Wed May 19 02:02:46 2021
+++ src/sys/net/if_spppsubr.c	Wed May 19 02:07:20 2021
@@ -1,4 +1,4 @@
-/*	$NetBSD: if_spppsubr.c,v 1.244 2021/05/19 02:02:46 yamaguchi Exp $	 */
+/*	$NetBSD: if_spppsubr.c,v 1.245 2021/05/19 02:07:20 yamaguchi Exp $	 */
 
 /*
  * Synchronous PPP/Cisco link level subroutines.
@@ -41,7 +41,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: if_spppsubr.c,v 1.244 2021/05/19 02:02:46 yamaguchi Exp $");
+__KERNEL_RCSID(0, "$NetBSD: if_spppsubr.c,v 1.245 2021/05/19 02:07:20 yamaguchi Exp $");
 
 #if defined(_KERNEL_OPT)
 #include "opt_inet.h"
@@ -3662,12 +3662,14 @@ sppp_ipcp_close(struct sppp *sp, void *x
 	sppp_close_event(sp, xcp);
 
 #ifdef INET
-	if (sp->ipcp.flags & (IPCP_MYADDR_DYN|IPCP_HISADDR_DYN))
+	if (sp->ipcp.flags & (IPCP_MYADDR_DYN|IPCP_HISADDR_DYN)) {
 		/*
 		 * Some address was dynamic, clear it again.
 		 */
 		sppp_clear_ip_addrs(sp);
+	}
 #endif
+	memset(&sp->dns_addrs, 0, sizeof sp->dns_addrs);
 }
 
 /*

Reply via email to