aboutsummaryrefslogtreecommitdiffstats
path: root/main/busybox/4006-ntpd-if-peer-does-not-reply-anymore-try-re-resolving.patch
diff options
context:
space:
mode:
authorNatanael Copa <ncopa@alpinelinux.org>2016-08-04 13:20:41 +0200
committerNatanael Copa <ncopa@alpinelinux.org>2016-08-04 15:39:25 +0200
commit6525b7aa7fbb97336a7656a5408d6505c2ac7ca3 (patch)
tree54eb98884f9d6e160768f06caa698a2b80fd8f08 /main/busybox/4006-ntpd-if-peer-does-not-reply-anymore-try-re-resolving.patch
parent8b04cc5199ded248ac18049e1fee5d680539c47f (diff)
downloadaports-6525b7aa7fbb97336a7656a5408d6505c2ac7ca3.tar.bz2
aports-6525b7aa7fbb97336a7656a5408d6505c2ac7ca3.tar.xz
main/busybox: upgrade to 1.25.0
Diffstat (limited to 'main/busybox/4006-ntpd-if-peer-does-not-reply-anymore-try-re-resolving.patch')
-rw-r--r--main/busybox/4006-ntpd-if-peer-does-not-reply-anymore-try-re-resolving.patch67
1 files changed, 0 insertions, 67 deletions
diff --git a/main/busybox/4006-ntpd-if-peer-does-not-reply-anymore-try-re-resolving.patch b/main/busybox/4006-ntpd-if-peer-does-not-reply-anymore-try-re-resolving.patch
deleted file mode 100644
index 8791b9735..000000000
--- a/main/busybox/4006-ntpd-if-peer-does-not-reply-anymore-try-re-resolving.patch
+++ /dev/null
@@ -1,67 +0,0 @@
-From c8641962e4cbde48108ddfc1c105e3320778190d Mon Sep 17 00:00:00 2001
-From: Denys Vlasenko <vda.linux@googlemail.com>
-Date: Fri, 4 Mar 2016 07:26:08 +0100
-Subject: [PATCH 4006/4007] ntpd: if peer does not reply anymore, try
- re-resolving its hostname
-
-function old new delta
-ntpd_main 1053 1130 +77
-add_peers 166 195 +29
-
-Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
----
- networking/ntpd.c | 19 +++++++++++++++++++
- 1 file changed, 19 insertions(+)
-
-diff --git a/networking/ntpd.c b/networking/ntpd.c
-index 517806e..4103189 100644
---- a/networking/ntpd.c
-+++ b/networking/ntpd.c
-@@ -267,6 +267,7 @@ typedef struct {
-
- typedef struct {
- len_and_sockaddr *p_lsa;
-+ char *p_hostname;
- char *p_dotted;
- int p_fd;
- int datapoint_idx;
-@@ -781,11 +782,14 @@ add_peers(const char *s)
- peer_t *pp = (peer_t *) item->data;
- if (strcmp(p->p_dotted, pp->p_dotted) == 0) {
- bb_error_msg("duplicate peer %s (%s)", s, p->p_dotted);
-+ free(p->p_lsa);
-+ free(p->p_dotted);
- free(p);
- return;
- }
- }
-
-+ p->p_hostname = xstrdup(s);
- p->p_fd = -1;
- p->p_xmt_msg.m_status = MODE_CLIENT | (NTP_VERSION << 3);
- p->next_action_time = G.cur_time; /* = set_next(p, 0); */
-@@ -2332,6 +2336,21 @@ int ntpd_main(int argc UNUSED_PARAM, char **argv)
- timeout = poll_interval(NOREPLY_INTERVAL);
- bb_error_msg("timed out waiting for %s, reach 0x%02x, next query in %us",
- p->p_dotted, p->reachable_bits, timeout);
-+
-+ /* What if don't see it because it changed its IP? */
-+ if (p->reachable_bits == 0) {
-+ len_and_sockaddr *lsa = host2sockaddr(p->p_hostname, 123);
-+ if (lsa) {
-+ char *dotted = xmalloc_sockaddr2dotted_noport(&lsa->u.sa);
-+ //if (strcmp(dotted, p->p_dotted) != 0)
-+ // bb_error_msg("peer IP changed");
-+ free(p->p_lsa);
-+ free(p->p_dotted);
-+ p->p_lsa = lsa;
-+ p->p_dotted = dotted;
-+ }
-+ }
-+
- set_next(p, timeout);
- }
- }
---
-2.8.3
-