0004-Fix-crash-when-binding-IPv6-address.patch 1007 B

1234567891011121314151617181920212223242526272829303132333435363738
  1. Fix crash when binding IPv6 address
  2. Reference:
  3. https://bugs.ntp.org/show_bug.cgi?id=3928
  4. Upstream: https://people.nwtime.org/hart/ntp-stable-3928-29.tar.gz
  5. Ported fix from updated tarball provided by upstream:
  6. https://bugs.ntp.org/show_bug.cgi?id=3928#c14
  7. Signed-off-by: TIAN Yuanhao <tianyuanhao3@163.com>
  8. ---
  9. ntpd/ntp_io.c | 6 +++---
  10. 1 file changed, 3 insertions(+), 3 deletions(-)
  11. Index: ntp-4.2.8p18/ntpd/ntp_io.c
  12. ===================================================================
  13. --- ntp-4.2.8p18.orig/ntpd/ntp_io.c
  14. +++ ntp-4.2.8p18/ntpd/ntp_io.c
  15. @@ -1917,15 +1917,15 @@ update_interfaces(
  16. }
  17. new_interface_found = TRUE;
  18. DPRINT_INTERFACE(3,
  19. - (ep, "updating ", " new - created\n"));
  20. + (ep2, "updating ", " new - created\n"));
  21. }
  22. else {
  23. DPRINT_INTERFACE(3,
  24. - (ep, "updating ", " new - FAILED"));
  25. + (ep2, "updating ", " new - FAILED"));
  26. msyslog(LOG_ERR,
  27. "cannot bind address %s",
  28. - stoa(&ep->sin));
  29. + stoa(&ep2->sin));
  30. }
  31. free(ep2);
  32. }