projects
/
people
/
alex
/
keepalived.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
f78c1cd
)
When parsing "blackhole" route, also parse IP mask.
author
Vincent Bernat
<bernat@luffy.cx>
Fri, 26 Feb 2010 08:06:46 +0000
(08:06 +0000)
committer
Alexandre Cassen
<acassen@freebox.fr>
Thu, 6 May 2010 13:08:51 +0000
(15:08 +0200)
Without this patch, the mask is always considered to be 0 but,
fortunately, the kernel does not want to add this route.
keepalived/vrrp/vrrp_iproute.c
patch
|
blob
|
history
diff --git
a/keepalived/vrrp/vrrp_iproute.c
b/keepalived/vrrp/vrrp_iproute.c
index
d4a57ad
..
130f4f0
100644
(file)
--- 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")) {