diff options
author | Matthias Schiffer <mschiffer@universe-factory.net> | 2015-03-23 00:37:36 +0100 |
---|---|---|
committer | Matthias Schiffer <mschiffer@universe-factory.net> | 2015-03-23 00:37:36 +0100 |
commit | 9a4b384053edf673f97dc60d82e1d897a70bd293 (patch) | |
tree | bc5a1515d30d6e1b8b903f2cc5c6126fee128e6c /src | |
parent | fe3433784f55ece5690746d1921b1d8f333d249e (diff) | |
download | fastd-9a4b384053edf673f97dc60d82e1d897a70bd293.tar fastd-9a4b384053edf673f97dc60d82e1d897a70bd293.zip |
Configure static peers before capabilities are dropped
Diffstat (limited to 'src')
-rw-r--r-- | src/config.c | 4 | ||||
-rw-r--r-- | src/config.h | 1 | ||||
-rw-r--r-- | src/fastd.c | 1 |
3 files changed, 4 insertions, 2 deletions
diff --git a/src/config.c b/src/config.c index e9d14c4..2deacd6 100644 --- a/src/config.c +++ b/src/config.c @@ -592,7 +592,7 @@ static void peer_dirs_read_peer_group(fastd_peer_group_t *group) { } /** Initializes the configured peers */ -static void configure_peers(void) { +void fastd_configure_peers(void) { ctx.has_floating = false; ssize_t i; @@ -643,7 +643,7 @@ void fastd_config_load_peer_dirs(void) { } peer_dirs_read_peer_group(conf.peer_group); - configure_peers(); + fastd_configure_peers(); } /** Frees all resources used by the global configuration */ diff --git a/src/config.h b/src/config.h index 872b0be..8c87e5a 100644 --- a/src/config.h +++ b/src/config.h @@ -60,6 +60,7 @@ void fastd_config_peer_group_pop(fastd_parser_state_t *state); void fastd_config_add_peer_dir(fastd_peer_group_t *group, const char *dir); void fastd_configure(int argc, char *const argv[]); +void fastd_configure_peers(void); void fastd_config_check(void); void fastd_config_load_peer_dirs(void); diff --git a/src/fastd.c b/src/fastd.c index 69efca5..af6d147 100644 --- a/src/fastd.c +++ b/src/fastd.c @@ -548,6 +548,7 @@ static inline void init(int argc, char *argv[]) { drop_caps(); on_up(ctx.iface); + fastd_configure_peers(); if (conf.drop_caps == DROP_CAPS_ON) drop_caps(); |