summaryrefslogtreecommitdiff
path: root/proto/radv/radv.h
diff options
context:
space:
mode:
authorAlexander Zubkov <green@qrator.net>2023-06-23 17:21:05 +0200
committerOndrej Zajicek <santiago@crfreenet.org>2023-06-23 17:26:03 +0200
commit9c81250c04798fd274ae9d77380e93b941ac2d7f (patch)
tree3f3913d4328f967669265b04138cf642fab10e2e /proto/radv/radv.h
parent65d6a525944faa3f77041419991d77106d8f0a0d (diff)
RAdv: Add custom options
Currently one can use only a predefined set of advertised options in RAdv protocol, which are supported by BIRD configuration. It would be convenient to be able to specify other possible options at least manually as a blob so one should not wait until it is supported in the code, released, etc. This idea is inspired by presentation by Ondřej Caletka at CSNOG, in which he noticed the lack of either PREF64 option or possibility to add custom options in various software. The patch makes it possible to define such options with the syntax: other type <num> <bytestring>
Diffstat (limited to 'proto/radv/radv.h')
-rw-r--r--proto/radv/radv.h10
1 files changed, 10 insertions, 0 deletions
diff --git a/proto/radv/radv.h b/proto/radv/radv.h
index 14d40f8a..8c716158 100644
--- a/proto/radv/radv.h
+++ b/proto/radv/radv.h
@@ -51,6 +51,7 @@ struct radv_config
list pref_list; /* Global list of prefix configs (struct radv_prefix_config) */
list rdnss_list; /* Global list of RDNSS configs (struct radv_rdnss_config) */
list dnssl_list; /* Global list of DNSSL configs (struct radv_dnssl_config) */
+ list custom_list; /* Global list of custom configs (struct radv_custom_config) */
net_addr trigger; /* Prefix of a trigger route, if defined */
u8 propagate_routes; /* Do we propagate more specific routes (RFC 4191)? */
@@ -63,6 +64,7 @@ struct radv_iface_config
list pref_list; /* Local list of prefix configs (struct radv_prefix_config) */
list rdnss_list; /* Local list of RDNSS configs (struct radv_rdnss_config) */
list dnssl_list; /* Local list of DNSSL configs (struct radv_dnssl_config) */
+ list custom_list; /* Local list of custom configs (struct radv_custom_config) */
u32 min_ra_int; /* Standard options from RFC 4861 */
u32 max_ra_int;
@@ -75,6 +77,7 @@ struct radv_iface_config
u8 rdnss_local; /* Global list is not used for RDNSS */
u8 dnssl_local; /* Global list is not used for DNSSL */
+ u8 custom_local; /* Global list is not used for custom */
u8 managed; /* Standard options from RFC 4861 */
u8 other_config;
@@ -122,6 +125,13 @@ struct radv_dnssl_config
const char *domain; /* Domain for DNS search list, in processed form */
};
+struct radv_custom_config
+{
+ node n;
+ u8 type; /* Identifier of the type of option */
+ struct bytestring *payload; /* Payload of the option */
+};
+
/*
* One more specific route as per RFC 4191.
*