aboutsummaryrefslogtreecommitdiffstats
path: root/pingu_conf.c
diff options
context:
space:
mode:
authorNatanael Copa <ncopa@alpinelinux.org>2011-10-07 16:10:10 +0200
committerNatanael Copa <ncopa@alpinelinux.org>2011-10-07 16:10:10 +0200
commit2b4edba3ad8431f8bd8b7218e9f8a5a5e4ee18ac (patch)
tree6561f793b675ae209e6936d8bf9f25f5749df9d1 /pingu_conf.c
parentf8b192af8b6611c3832df3024cbabaafffb47591 (diff)
downloadpingu-2b4edba3ad8431f8bd8b7218e9f8a5a5e4ee18ac.tar.bz2
pingu-2b4edba3ad8431f8bd8b7218e9f8a5a5e4ee18ac.tar.xz
pingu_iface: support binding multiple ping hosts to same iface
Add config option for executing actions when interface gateway goes up/down. Add config option for required hosts up per interface (defaults to 1)
Diffstat (limited to 'pingu_conf.c')
-rw-r--r--pingu_conf.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/pingu_conf.c b/pingu_conf.c
index 30dec9a..ad433e8 100644
--- a/pingu_conf.c
+++ b/pingu_conf.c
@@ -130,6 +130,14 @@ static int pingu_conf_read_iface(struct pingu_conf *conf, char *ifname)
break;
if (strcmp(key, "route-table") == 0) {
pingu_iface_set_route_table(iface, atoi(value));
+ } else if (strcmp(key, "label") == 0) {
+ iface->label = xstrdup(value);
+ } else if (strcmp(key, "gateway-up-action") == 0) {
+ iface->gw_up_action = xstrdup(value);
+ } else if (strcmp(key, "gateway-down-action") == 0) {
+ iface->gw_down_action = xstrdup(value);
+ } else if (strcmp(key, "required-hosts-online") == 0) {
+ iface->required_hosts_online = atoi(value);
} else if (strcmp(key, "load-balance") == 0) {
int weight = 0;
if (value != NULL) {