summaryrefslogtreecommitdiff
path: root/zebra/rtadv.h
diff options
context:
space:
mode:
authorLars Seipel <ls@slrz.net>2019-01-26 23:51:48 +0100
committerLars Seipel <ls@slrz.net>2019-02-02 19:10:19 +0100
commit3eb4fbb0f5c79955c3a3cfbfdfe5c2d8d57f654f (patch)
treeb462fe48ed988dc899bd75b5e08d2e0edd4a6855 /zebra/rtadv.h
parent41e8603bfab2db06ac0f29bd57e95508bfae6798 (diff)
zebra: support DNS configuration options in rtadv
Add support for the RDNSS and DNSSL router advertisement options described in RFC 8106. Signed-off-by: Lars Seipel <ls@slrz.net>
Diffstat (limited to 'zebra/rtadv.h')
-rw-r--r--zebra/rtadv.h31
1 files changed, 31 insertions, 0 deletions
diff --git a/zebra/rtadv.h b/zebra/rtadv.h
index 03db13fd69..f7c27ebcb3 100644
--- a/zebra/rtadv.h
+++ b/zebra/rtadv.h
@@ -91,6 +91,37 @@ struct nd_opt_homeagent_info { /* Home Agent info */
} __attribute__((__packed__));
#endif
+#ifndef ND_OPT_RDNSS
+#define ND_OPT_RDNSS 25
+#endif
+#ifndef ND_OPT_DNSSL
+#define ND_OPT_DNSSL 31
+#endif
+
+#ifndef HAVE_STRUCT_ND_OPT_RDNSS
+struct nd_opt_rdnss { /* Recursive DNS server option [RFC8106 5.1] */
+ uint8_t nd_opt_rdnss_type;
+ uint8_t nd_opt_rdnss_len;
+ uint16_t nd_opt_rdnss_reserved;
+ uint32_t nd_opt_rdnss_lifetime;
+ /* Followed by one or more IPv6 addresses */
+} __attribute__((__packed__));
+#endif
+
+#ifndef HAVE_STRUCT_ND_OPT_DNSSL
+struct nd_opt_dnssl { /* DNS search list option [RFC8106 5.2] */
+ uint8_t nd_opt_dnssl_type;
+ uint8_t nd_opt_dnssl_len;
+ uint16_t nd_opt_dnssl_reserved;
+ uint32_t nd_opt_dnssl_lifetime;
+ /*
+ * Followed by one or more domain names encoded as in [RFC1035 3.1].
+ * Multiple domain names are concatenated after encoding. In any case,
+ * the result is zero-padded to a multiple of 8 octets.
+ */
+} __attribute__((__packed__));
+#endif
+
extern const char *rtadv_pref_strs[];
#endif /* HAVE_RTADV */