summaryrefslogtreecommitdiff
path: root/zebra/rtadv.h
diff options
context:
space:
mode:
authorDon Slice <dslice@cumulusnetworks.com>2020-02-10 18:58:41 +0000
committerDon Slice <dslice@cumulusnetworks.com>2020-02-14 17:03:16 +0000
commit2a85576310187cd6f4e43849e028faed986b551b (patch)
treef765ee40de1685a4325e74c973e1bcc87704db0a /zebra/rtadv.h
parent547b989938068d9be646a79c60f87296fdba3558 (diff)
zebra: add all ipv6 global addresses to RA messages
RFC 4861 states that ipv6 RA messages sent out an interface should contain all global ipv6 addresses on that interface. This fix adds that capability. To override the default flags and timer settings for a particular prefix, the existing "ipv6 nd prefix ..." command should be used via vtysh under the appropriate interface. Ticket: CM-20363 Signed-off-by: Don Slice <dslice@cumulusnetworks.com>
Diffstat (limited to 'zebra/rtadv.h')
-rw-r--r--zebra/rtadv.h16
1 files changed, 16 insertions, 0 deletions
diff --git a/zebra/rtadv.h b/zebra/rtadv.h
index 63cec94434..64b28cbfd6 100644
--- a/zebra/rtadv.h
+++ b/zebra/rtadv.h
@@ -37,6 +37,9 @@ struct rtadv_prefix {
/* Prefix to be advertised. */
struct prefix_ipv6 prefix;
+ /* The prefix was manually/automatically defined. */
+ int AdvPrefixCreate;
+
/* The value to be placed in the Valid Lifetime in the Prefix */
uint32_t AdvValidLifetime;
#define RTADV_VALID_LIFETIME 2592000
@@ -133,6 +136,17 @@ struct nd_opt_dnssl { /* DNS search list option [RFC8106 5.2] */
#endif /* HAVE_RTADV */
+/*
+ * ipv6 nd prefixes can be manually defined, derived from the kernel interface
+ * configs or both. If both, manual flag/timer settings are used.
+ */
+enum ipv6_nd_prefix_source {
+ PREFIX_SRC_NONE = 0,
+ PREFIX_SRC_MANUAL,
+ PREFIX_SRC_AUTO,
+ PREFIX_SRC_BOTH,
+};
+
typedef enum {
RA_ENABLE = 0,
RA_SUPPRESS,
@@ -145,6 +159,8 @@ extern void rtadv_stop_ra_all(void);
extern void rtadv_cmd_init(void);
extern void zebra_interface_radv_disable(ZAPI_HANDLER_ARGS);
extern void zebra_interface_radv_enable(ZAPI_HANDLER_ARGS);
+extern void rtadv_add_prefix(struct zebra_if *zif, const struct prefix_ipv6 *p);
+extern void rtadv_delete_prefix(struct zebra_if *zif, const struct prefix *p);
#ifdef __cplusplus
}