From: Vincent Bernat Date: Fri, 26 Feb 2010 08:06:46 +0000 (+0000) Subject: When parsing "blackhole" route, also parse IP mask. X-Git-Tag: v1.2.1~21 X-Git-Url: http://git.formilux.org/?a=commitdiff_plain;h=2d4b0d13ebf9c337a8e4cea6e39dd5315f5d65dc;p=people%2Falex%2Fkeepalived.git When parsing "blackhole" route, also parse IP mask. Without this patch, the mask is always considered to be 0 but, fortunately, the kernel does not want to add this route. --- diff --git a/keepalived/vrrp/vrrp_iproute.c b/keepalived/vrrp/vrrp_iproute.c index d4a57ad..130f4f0 100644 --- a/keepalived/vrrp/vrrp_iproute.c +++ b/keepalived/vrrp/vrrp_iproute.c @@ -192,6 +192,7 @@ alloc_route(list rt_list, vector strvec) if (!strcmp(str, "blackhole")) { new->blackhole = 1; inet_ston(VECTOR_SLOT(strvec, ++i), &new->dst); + new->dmask = inet_stom(VECTOR_SLOT(strvec, i)); } else if (!strcmp(str, "via") || !strcmp(str, "gw")) { inet_ston(VECTOR_SLOT(strvec, ++i), &new->gw); } else if (!strcmp(str, "or")) {