diff options
author | Maria Matejka <mq@ucw.cz> | 2022-05-30 15:31:19 +0200 |
---|---|---|
committer | Maria Matejka <mq@ucw.cz> | 2022-05-30 15:31:19 +0200 |
commit | d7b077f5d63625beaca1bcfe971e3b853dbfcc06 (patch) | |
tree | 7d0e8d62cca65ae2dd3d5e6231657f1e43630b5a /proto/bfd | |
parent | d024f471ea5239a8cb6ce2ccd83b686a1d438aa5 (diff) | |
parent | 4a23ede2b056a41456790cc20a0c3d92a7137693 (diff) |
Merge commit '4a23ede2b056a41456790cc20a0c3d92a7137693' into haugesund
Diffstat (limited to 'proto/bfd')
-rw-r--r-- | proto/bfd/Makefile | 3 | ||||
-rw-r--r-- | proto/bfd/bfd.c | 17 |
2 files changed, 10 insertions, 10 deletions
diff --git a/proto/bfd/Makefile b/proto/bfd/Makefile index 402122fc..dbdc0a09 100644 --- a/proto/bfd/Makefile +++ b/proto/bfd/Makefile @@ -2,5 +2,6 @@ src := bfd.c io.c packets.c obj := $(src-o-files) $(all-daemon) $(cf-local) +$(call proto-build,bfd_build) -tests_objs := $(tests_objs) $(src-o-files)
\ No newline at end of file +tests_objs := $(tests_objs) $(src-o-files) diff --git a/proto/bfd/bfd.c b/proto/bfd/bfd.c index 277f38bf..d1e97cd5 100644 --- a/proto/bfd/bfd.c +++ b/proto/bfd/bfd.c @@ -113,8 +113,8 @@ #define HASH_IP_EQ(a1,n1,a2,n2) ipa_equal(a1, a2) && n1 == n2 #define HASH_IP_FN(a,n) ipa_hash(a) ^ u32_hash(n) -static list bfd_proto_list; -static list bfd_wait_list; +static list STATIC_LIST_INIT(bfd_proto_list); +static list STATIC_LIST_INIT(bfd_wait_list); const char *bfd_state_names[] = { "AdminDown", "Down", "Init", "Up" }; @@ -998,13 +998,6 @@ bfd_notify_init(struct bfd_proto *p) * BFD protocol glue */ -void -bfd_init_all(void) -{ - init_list(&bfd_proto_list); - init_list(&bfd_wait_list); -} - static struct proto * bfd_init(struct proto_config *c) { @@ -1186,3 +1179,9 @@ struct protocol proto_bfd = { .reconfigure = bfd_reconfigure, .copy_config = bfd_copy_config, }; + +void +bfd_build(void) +{ + proto_build(&proto_bfd); +} |