Hi again,

Just found a bug in the patch, while testing I only use one host in each group, failover using another group.

This works, but only calling sync_table() with multiple hosts in a group (we want that :) ), causes the parent to exit when calling sync_table().

I'll rework the patch and do more testing before submitting again.


Solution:
The logic is already in the code, but right now it only handle the
statistics and set the host as being down.

Call sync_table() when a host goes from UP to DOWN.


Index: pfe.c
===================================================================
RCS file: /cvs/src/usr.sbin/relayd/pfe.c,v
retrieving revision 1.79.2.1
diff -u -p -u -p -r1.79.2.1 pfe.c
--- pfe.c       20 Sep 2015 11:20:16 -0000      1.79.2.1
+++ pfe.c       1 Oct 2015 10:48:59 -0000
@@ -152,6 +152,7 @@ pfe_dispatch_hce(int fd, struct privsep_
                        table->conf.flags |= F_CHANGED;
                        host->flags |= F_DEL;
                        host->flags &= ~(F_ADD);
+                       pfe_sync();
                }

                host->up = st.up;




--
bsv

Reply via email to