aboutsummaryrefslogtreecommitdiffstats
path: root/src/pingu_conf.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/pingu_conf.c')
-rw-r--r--src/pingu_conf.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/src/pingu_conf.c b/src/pingu_conf.c
index 6470809..292d220 100644
--- a/src/pingu_conf.c
+++ b/src/pingu_conf.c
@@ -173,12 +173,14 @@ static int pingu_conf_read_iface(struct pingu_conf *conf, char *ifname)
} else if (strcmp(key, "load-balance") == 0) {
int weight = 0;
if (value != NULL) {
- weight = atoi(value);
- if (weight <= 0 || weight > 256) {
+ int err;
+ err = parse_int(value, &weight, conf->lineno);
+ if (!err && (weight <= 0 || weight > 256)) {
log_error("Invalid load-balance weight %i on line %i",
weight, conf->lineno);
- return -1;
+ r++;
}
+ r += err;
}
pingu_iface_set_balance(iface, weight);
} else if (strcmp(key, "ping") == 0) {