From 412e341def88b0734fbac2c2f19fcecf2486ee86 Mon Sep 17 00:00:00 2001 From: Matthias Schiffer Date: Sun, 18 Oct 2015 03:32:21 +0200 Subject: config: make on_up/down/establish/disestablish commands configurable per peer group --- src/fastd.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'src/fastd.c') diff --git a/src/fastd.c b/src/fastd.c index 0d4f577..fbeffe5 100644 --- a/src/fastd.c +++ b/src/fastd.c @@ -39,6 +39,7 @@ #include "config.h" #include "crypto.h" #include "peer.h" +#include "peer_group.h" #include "peer_hashtable.h" #include "poll.h" #include @@ -214,7 +215,7 @@ static inline void on_pre_up(void) { static inline void on_up(fastd_iface_t *iface) { fastd_shell_env_t *env = fastd_shell_env_alloc(); fastd_shell_env_set_iface(env, iface); - fastd_shell_command_exec_sync(&conf.on_up, env, NULL); + fastd_shell_command_exec_sync(&conf.peer_group->on_up, env, NULL); fastd_shell_env_free(env); } @@ -222,7 +223,7 @@ static inline void on_up(fastd_iface_t *iface) { static inline void on_down(fastd_iface_t *iface) { fastd_shell_env_t *env = fastd_shell_env_alloc(); fastd_shell_env_set_iface(env, iface); - fastd_shell_command_exec_sync(&conf.on_down, env, NULL); + fastd_shell_command_exec_sync(&conf.peer_group->on_down, env, NULL); fastd_shell_env_free(env); } -- cgit v1.2.3