summaryrefslogtreecommitdiffstats
path: root/src/fastd.c
diff options
context:
space:
mode:
authorMatthias Schiffer <mschiffer@universe-factory.net>2015-10-18 03:32:21 +0200
committerMatthias Schiffer <mschiffer@universe-factory.net>2015-10-18 03:32:21 +0200
commit412e341def88b0734fbac2c2f19fcecf2486ee86 (patch)
treef4050b542181869766dbb437ed06ec08cde1f3cb /src/fastd.c
parentdf48485aeab897c50fd792a740d1a5aed4378fc9 (diff)
downloadfastd-412e341def88b0734fbac2c2f19fcecf2486ee86.tar
fastd-412e341def88b0734fbac2c2f19fcecf2486ee86.zip
config: make on_up/down/establish/disestablish commands configurable per peer group
Diffstat (limited to 'src/fastd.c')
-rw-r--r--src/fastd.c5
1 files changed, 3 insertions, 2 deletions
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 <fastd_version.h>
@@ -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);
}