[PATCH] Fix a segfault happening when there is no real server for a virtual server.
Paolo Penzo <[email protected]>
| Newsgroups | gmane.linux.keepalived.devel |
|---|---|
| Message-ID | <[email protected]> |
Hi, this issue has already been fixed in release 1.1.8 but it seems that it has been reintroduced somehow. Here there is a patch to fix it for keepalived 1.2.6 onward. Paolo. ________________________________ Non stampare questa e-mail. Questo documento e' formato esclusivamente per il destinatario. Tutte le informazioni ivi contenute, compresi eventuali allegati, sono soggette a riservatezza a termini del vigente D.Lgs. 196/2003 in materia di privacy e quindi ne e' proibita l'utilizzazione. Se avete ricevuto per errore questo messaggio, Vi preghiamo cortesemente di contattare immediatamente il mittente e cancellare la e-mail. Grazie. Please don't print this e-mail. Confidentiality Notice - This e-mail message including any attachments is for the sole use of the intended recipient and may contain confidential and privileged information. Any unauthorized review, use, disclosure or distribution is prohibited. If you are not the intended recipient, please contact the sender by reply e-mail and destroy all copies of the original message. ------------------------------------------------------------------------------ Go from Idea to Many App Stores Faster with Intel(R) XDK Give your users amazing mobile app experiences with Intel(R) XDK. Use one codebase in this all-in-one HTML5 development environment. Design, debug & build mobile apps & 2D/3D high-impact games for multiple OSs. http://pubads.g.doubleclick.net/gampad/clk?id=254741911&iu=/4140 _______________________________________________ Keepalived-devel mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/keepalived-devel
keepalived-1.2.16-emptyrslist.patch
(text/plain, 907 B)
diff -up ./keepalived/check/ipwrapper.c.emptyrslist ./keepalived/check/ipwrapper.c
--- ./keepalived/check/ipwrapper.c.emptyrslist 2015-12-03 08:40:39.777995436 +0100
+++ ./keepalived/check/ipwrapper.c 2015-12-03 08:43:50.568094456 +0100
@@ -42,6 +42,9 @@ weigh_live_realservers(virtual_server_t
real_server_t *svr;
long count = 0;
+ if (LIST_ISEMPTY(vs->rs))
+ return;
+
for (e = LIST_HEAD(vs->rs); e; ELEMENT_NEXT(e)) {
svr = ELEMENT_DATA(e);
if (ISALIVE(svr))
@@ -156,6 +159,12 @@ init_service_rs(virtual_server_t * vs)
element e;
real_server_t *rs;
+ if (LIST_ISEMPTY(vs->rs)) {
+ log_message(LOG_WARNING, "VS [%s] has no configured RS! Skipping RS activation."
+ , FMT_VS(vs));
+ return 1;
+ }
+
for (e = LIST_HEAD(vs->rs); e; ELEMENT_NEXT(e)) {
rs = ELEMENT_DATA(e);
/* Do not re-add failed RS instantly on reload */