Gentoo Archives: gentoo-commits

From: Aaron Bauman <bman@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: sys-cluster/keepalived/files/
Date: Wed, 01 Jul 2020 19:59:43
Message-Id: 1593633457.297af454fdf41b1f5e7e9391c910f1b3b5a3d929.bman@gentoo
1 commit: 297af454fdf41b1f5e7e9391c910f1b3b5a3d929
2 Author: Michael Mair-Keimberger <m.mairkeimberger <AT> gmail <DOT> com>
3 AuthorDate: Wed Jul 1 17:18:00 2020 +0000
4 Commit: Aaron Bauman <bman <AT> gentoo <DOT> org>
5 CommitDate: Wed Jul 1 19:57:37 2020 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=297af454
7
8 sys-cluster/keepalived: remove unused patch
9
10 Package-Manager: Portage-2.3.103, Repoman-2.3.23
11 Signed-off-by: Michael Mair-Keimberger <m.mairkeimberger <AT> gmail.com>
12 Closes: https://github.com/gentoo/gentoo/pull/16535
13 Signed-off-by: Aaron Bauman <bman <AT> gentoo.org>
14
15 .../files/keepalived-2.0.10-snmp-crash-fix.patch | 122 ---------------------
16 1 file changed, 122 deletions(-)
17
18 diff --git a/sys-cluster/keepalived/files/keepalived-2.0.10-snmp-crash-fix.patch b/sys-cluster/keepalived/files/keepalived-2.0.10-snmp-crash-fix.patch
19 deleted file mode 100644
20 index c1a5ab36180..00000000000
21 --- a/sys-cluster/keepalived/files/keepalived-2.0.10-snmp-crash-fix.patch
22 +++ /dev/null
23 @@ -1,122 +0,0 @@
24 -diff --git a/keepalived/check/check_snmp.c b/keepalived/check/check_snmp.c
25 -index 67ae0e4f9..95c6e6f83 100644
26 ---- a/keepalived/check/check_snmp.c
27 -+++ b/keepalived/check/check_snmp.c
28 -@@ -1451,6 +1451,9 @@ static struct variable8 check_vars[] = {
29 - void
30 - check_snmp_agent_init(const char *snmp_socket)
31 - {
32 -+ if (snmp_running)
33 -+ return;
34 -+
35 - /* We handle the global oid if we are running SNMP */
36 - snmp_agent_init(snmp_socket, true);
37 - snmp_register_mib(check_oid, OID_LENGTH(check_oid), "Healthchecker",
38 -@@ -1462,6 +1465,9 @@ check_snmp_agent_init(const char *snmp_socket)
39 - void
40 - check_snmp_agent_close()
41 - {
42 -+ if (!snmp_running)
43 -+ return;
44 -+
45 - snmp_unregister_mib(check_oid, OID_LENGTH(check_oid));
46 - snmp_agent_close(true);
47 - }
48 -diff --git a/keepalived/core/snmp.c b/keepalived/core/snmp.c
49 -index a9472feae..eb5bed20a 100644
50 ---- a/keepalived/core/snmp.c
51 -+++ b/keepalived/core/snmp.c
52 -@@ -325,6 +325,9 @@ snmp_unregister_mib(oid *myoid, size_t len)
53 - void
54 - snmp_agent_init(const char *snmp_socket, bool base_mib)
55 - {
56 -+ if (snmp_running)
57 -+ return;
58 -+
59 - log_message(LOG_INFO, "Starting SNMP subagent");
60 - netsnmp_enable_subagent();
61 - snmp_disable_log();
62 -@@ -378,6 +381,9 @@ snmp_agent_init(const char *snmp_socket, bool base_mib)
63 - void
64 - snmp_agent_close(bool base_mib)
65 - {
66 -+ if (!snmp_running)
67 -+ return;
68 -+
69 - if (base_mib)
70 - snmp_unregister_mib(global_oid, OID_LENGTH(global_oid));
71 - snmp_shutdown(global_name);
72 -diff --git a/keepalived/vrrp/vrrp_snmp.c b/keepalived/vrrp/vrrp_snmp.c
73 -index ca9d46768..db696159c 100644
74 ---- a/keepalived/vrrp/vrrp_snmp.c
75 -+++ b/keepalived/vrrp/vrrp_snmp.c
76 -@@ -4552,6 +4552,9 @@ vrrp_handles_global_oid(void)
77 - void
78 - vrrp_snmp_agent_init(const char *snmp_socket)
79 - {
80 -+ if (snmp_running)
81 -+ return;
82 -+
83 - /* We let the check process handle the global OID if it is running and with snmp */
84 - snmp_agent_init(snmp_socket, vrrp_handles_global_oid());
85 -
86 -@@ -4581,6 +4584,9 @@ vrrp_snmp_agent_init(const char *snmp_socket)
87 - void
88 - vrrp_snmp_agent_close(void)
89 - {
90 -+ if (!snmp_running)
91 -+ return;
92 -+
93 - #ifdef _WITH_SNMP_VRRP_
94 - if (global_data->enable_snmp_vrrp)
95 - snmp_unregister_mib(vrrp_oid, OID_LENGTH(vrrp_oid));
96 -diff --git a/lib/scheduler.c b/lib/scheduler.c
97 -index 0a1c334c3..9090a7f88 100644
98 ---- a/lib/scheduler.c
99 -+++ b/lib/scheduler.c
100 -@@ -1630,7 +1630,7 @@ thread_fetch_next_queue(thread_master_t *m)
101 - if (!ev->read) {
102 - log_message(LOG_INFO, "scheduler: No read thread bound on fd:%d (fl:0x%.4X)"
103 - , ev->fd, ep_ev->events);
104 -- assert(0);
105 -+ continue;
106 - }
107 - thread_move_ready(m, &m->read, ev->read, THREAD_READY_FD);
108 - ev->read = NULL;
109 -@@ -1641,7 +1641,7 @@ thread_fetch_next_queue(thread_master_t *m)
110 - if (!ev->write) {
111 - log_message(LOG_INFO, "scheduler: No write thread bound on fd:%d (fl:0x%.4X)"
112 - , ev->fd, ep_ev->events);
113 -- assert(0);
114 -+ continue;
115 - }
116 - thread_move_ready(m, &m->write, ev->write, THREAD_READY_FD);
117 - ev->write = NULL;
118 -@@ -1710,7 +1710,12 @@ process_threads(thread_master_t *m)
119 - thread = thread_trim_head(thread_list);
120 - if (!shutting_down ||
121 - (thread->type == THREAD_READY_FD &&
122 -- (thread->u.fd == m->timer_fd || thread->u.fd == m->signal_fd)) ||
123 -+ (thread->u.fd == m->timer_fd ||
124 -+ thread->u.fd == m->signal_fd
125 -+#ifdef _WITH_SNMP_
126 -+ || FD_ISSET(thread->u.fd, &m->snmp_fdset)
127 -+#endif
128 -+ )) ||
129 - thread->type == THREAD_CHILD ||
130 - thread->type == THREAD_CHILD_TIMEOUT ||
131 - thread->type == THREAD_CHILD_TERMINATED ||
132 -diff --git a/lib/utils.c b/lib/utils.c
133 -index 6f9ec254d..e5b82b524 100644
134 ---- a/lib/utils.c
135 -+++ b/lib/utils.c
136 -@@ -789,7 +789,9 @@ FILE *fopen_safe(const char *path, const char *mode)
137 - {
138 - int fd;
139 - FILE *file;
140 -+#ifdef ENABLE_LOG_FILE_APPEND
141 - int flags = O_NOFOLLOW | O_CREAT | O_CLOEXEC;
142 -+#endif
143 - int sav_errno;
144 - char file_tmp_name[] = "/tmp/keepalivedXXXXXX";
145 -