[ipv4] Add support for classless static routes

Add support for RFC 3442 classless static routes provided via DHCP
option 121.

Originally-implemented-by: Hazel Smith <hazel.smith@leicester.ac.uk>
Originally-implemented-by: Raphael Pour <raphael.pour@hetzner.com>
Signed-off-by: Michael Brown <mcb30@ipxe.org>
This commit is contained in:
Michael Brown
2025-06-10 16:55:18 +01:00
parent e648d23fba
commit b5fb7353fa
5 changed files with 156 additions and 43 deletions

View File

@@ -344,6 +344,9 @@ struct dhcp_client_uuid {
/** DNS domain search list */
#define DHCP_DOMAIN_SEARCH 119
/** Classless static routes */
#define DHCP_STATIC_ROUTES 121
/** Etherboot-specific encapsulated options
*
* This encapsulated options field is used to contain all options

View File

@@ -437,6 +437,8 @@ netmask_setting __setting ( SETTING_IP4, netmask );
extern const struct setting
gateway_setting __setting ( SETTING_IP4, gateway );
extern const struct setting
static_route_setting __setting ( SETTING_IP4, static_routes );
extern const struct setting
dns_setting __setting ( SETTING_IP4_EXTRA, dns );
extern const struct setting
ip6_setting __setting ( SETTING_IP6, ip6 );