From 9c2615af1b342e1d4be09705c06de8c0ce80c6c0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marek=20K=C3=BCthe?= Date: Sun, 30 Jun 2024 15:02:42 +0000 Subject: [PATCH] Adapt the documentation to pass more strict functional testing in bird without warning In the newer bird versions it is necessary to specify the return data type for functions with a return value in the format `-> [return type]`. --- docs/routing/bird/bird.md | 8 ++++---- docs/routing/bird/maxlen-filter.md | 4 ++-- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/docs/routing/bird/bird.md b/docs/routing/bird/bird.md index 8d41caa..e96cd48 100644 --- a/docs/routing/bird/bird.md +++ b/docs/routing/bird/bird.md @@ -50,11 +50,11 @@ hostname HOSTNAME; ipv6 table crxn; -function is_self_net() { +function is_self_net() -> bool { return net ~ OWNNETSET; } -function is_valid_network() { +function is_valid_network() -> bool { return net ~ [ fd00::/8{44,64} ]; @@ -132,14 +132,14 @@ Here an IPv6 routing table with the name `crxn` is created. Alternatively, you c Next comes a set of utility functions that will later help us build the filters. ``` -function is_self_net() { +function is_self_net() -> bool { return net ~ OWNNETSET; } ``` This function returns `true` if the net is the own, otherwise `false`. ``` -function is_valid_network() { +function is_valid_network() -> bool { return net ~ [ fd00::/8{44,64} ]; diff --git a/docs/routing/bird/maxlen-filter.md b/docs/routing/bird/maxlen-filter.md index 31d09c0..077b171 100644 --- a/docs/routing/bird/maxlen-filter.md +++ b/docs/routing/bird/maxlen-filter.md @@ -12,11 +12,11 @@ define CRXN_MAXLEN = [ include ""; ]; -function is_crxn_net() { +function is_crxn_net() -> bool { return net ~ CRXN_IPs; } -function is_maxlen_valid() { +function is_maxlen_valid() -> bool { return net ~ CRXN_MAXLEN; } ```