mirror of
https://github.com/freebsd/freebsd-src.git
synced 2026-10-28 11:25:21 +01:00
ntpd: Fix segfault when same IP on multiple interfaces
Use the protype socket to obtain the IP address for an error message.
Using the resultant socket address, a NULL because create_interface()
had failed, results in SIGSEGV.
To reproduce this bug,
ifconfig bridge100 create
ifconfig bridge100 10.10.10.10/24
ifconfig bridge101 create
ifconfig bridge101 10.10.10.10/24
ntpd -n
PR: 291119
(cherry picked from commit ac1f48b4a7)
This commit is contained in:
1 parent
b409b786b8
commit
25587b30c3
1 file changed
+1
-1
@@ -1923,7 +1923,7 @@ update_interfaces(
|
||||
|
||||
msyslog(LOG_ERR,
|
||||
"cannot bind address %s",
|
||||
stoa(&ep->sin));
|
||||
stoa(&ep2->sin));
|
||||
}
|
||||
free(ep2);
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user