Module Name: src
Committed By: kardel
Date: Fri Aug 17 22:37:26 UTC 2012
Modified Files:
src/external/bsd/ntp/dist/ntpd: ntp_io.c
Log Message:
re-enable broadcast client config after interface re-scanning
make broadcast transmission work again
To generate a diff of this commit:
cvs rdiff -u -r1.9 -r1.10 src/external/bsd/ntp/dist/ntpd/ntp_io.c
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: src/external/bsd/ntp/dist/ntpd/ntp_io.c
diff -u src/external/bsd/ntp/dist/ntpd/ntp_io.c:1.9 src/external/bsd/ntp/dist/ntpd/ntp_io.c:1.10
--- src/external/bsd/ntp/dist/ntpd/ntp_io.c:1.9 Wed Feb 1 21:21:25 2012
+++ src/external/bsd/ntp/dist/ntpd/ntp_io.c Fri Aug 17 22:37:26 2012
@@ -1,4 +1,4 @@
-/* $NetBSD: ntp_io.c,v 1.9 2012/02/01 21:21:25 kardel Exp $ */
+/* $NetBSD: ntp_io.c,v 1.10 2012/08/17 22:37:26 kardel Exp $ */
/*
* ntp_io.c - input/output routines for ntpd. The socket-opening code
@@ -1592,9 +1592,11 @@ refresh_interface(
{
#ifdef OS_MISSES_SPECIFIC_ROUTE_UPDATES
if (interface->fd != INVALID_SOCKET) {
+ int bcast = (interface->flags & INT_BCASTOPEN) != 0;
close_and_delete_fd_from_list(interface->fd);
+ interface->flags &= ~INT_BCASTOPEN;
interface->fd = open_socket(&interface->sin,
- 0, 0, interface);
+ bcast, 0, interface);
/*
* reset TTL indication so TTL is is set again
* next time around
@@ -2047,6 +2049,9 @@ update_interfaces(
msyslog(LOG_INFO, "peers refreshed");
}
+ if (sys_bclient)
+ io_setbclient();
+
return new_interface_found;
}
@@ -2074,9 +2079,6 @@ create_sockets(
update_interfaces(port, NULL, NULL);
- if (sys_bclient)
- io_setbclient();
-
/*
* Now that we have opened all the sockets, turn off the reuse
* flag for security.