[ipxe-devel] [PATCH 05/10] ndp: make IPv6 prefix user-settable

Hannes Reinecke hare at suse.de
Thu Apr 30 13:18:45 UTC 2015


NDP will discover the IPv6 on-link prefix, so we should make
it user-settable.

Signed-off-by: Hannes Reinecke <hare at suse.de>
---
 src/net/ndp.c | 11 +++++++++++
 1 file changed, 11 insertions(+)

diff --git a/src/net/ndp.c b/src/net/ndp.c
index d7ae573..e4e3262 100644
--- a/src/net/ndp.c
+++ b/src/net/ndp.c
@@ -775,6 +775,17 @@ static int ndp_register_settings ( struct net_device *netdev,
 	return rc;
 }
 
+/** Prefix setting */
+const struct setting ndp_prefix6_setting __setting ( SETTING_IP_EXTRA, prefix6) = {
+	.name = "prefix6",
+	.description = "IPv6 prefix",
+	.tag = NDP_TAG ( NDP_OPT_PREFIX,
+			 offsetof ( struct ndp_prefix_information_option,
+				    prefix ) ),
+	.type = &setting_type_ipv6,
+	.scope = &ndp_settings_scope,
+};
+
 /** DNS server setting */
 const struct setting ndp_dns6_setting __setting ( SETTING_IP_EXTRA, dns6 ) = {
 	.name = "dns6",
-- 
1.8.4.5




More information about the ipxe-devel mailing list