On 2014-11-03 12:43, Gerhard Roth wrote:
CVSROOT:        /cvs
Module name:    src
Changes by:     gerh...@cvs.openbsd.org 2014/11/03 04:43:47

Modified files:
        sys/netinet    : ip_carp.c

Log message:
Fix kernel stack overflow by preventing carp_send_ad_all() from re-entrant calls. Also, when adjusting demote counts, don't call carp_send_ad_all()
for every ifgroup with a demote count of 1 but rather call it only once
after adjusting the demote counts of all ifgroups.

While this definitely fixes a problem it seems like a horrible workaround to me. I understand that carp(4) is a mess, but can we try to fix this in a proper way? Do you have an easy way to reproduce this recursion? Did you consider improving the error handling of carp_send_ad() & friends? Returning a proper error code and dealing with it in carp_group_demote_adj() for example, would also fixes the problem and makes the code easier to understand.

Reply via email to