diff options
author | Lucas Alvares Gomes <lucasagomes@gmail.com> | 2019-03-07 16:28:35 +0000 |
---|---|---|
committer | Ben Pfaff <blp@ovn.org> | 2019-03-07 14:11:51 -0800 |
commit | 2a7be04ea9275317f295f66a9335f37af7e864e0 (patch) | |
tree | d3f1d3f6c9b25676cc74e3999de2f41dfc388082 /ovn | |
parent | 318799a286c1a80c3c19415d878dc374e4f00cc8 (diff) | |
download | openvswitch-2a7be04ea9275317f295f66a9335f37af7e864e0.tar.gz |
OVN: Add support for DHCP option 150 - TFTP server address
OpenStack Ironic relies on a few DHCP options [0] that were not
supported in OVN yet. This patch is adding the last one which is the
option 150 (TFTP server address, RFC5859 [1]).
Note that this option is Cisco proprietary, the IEEE standard that
matches with this requirement is Option 66. The difference is that 150
allows to multiple IPs to be specified and 66 only allows one.
[0]
https://github.com/openstack/ironic/blob/3f6d4c6a789b12512d6cc67cdbc93ba5fbf29848/ironic/common/pxe_utils.py#L44-L54
[1] https://tools.ietf.org/html/rfc5859
Signed-off-by: Lucas Alvares Gomes <lucasagomes@gmail.com>
Signed-off-by: Ben Pfaff <blp@ovn.org>
Diffstat (limited to 'ovn')
-rw-r--r-- | ovn/lib/ovn-l7.h | 2 | ||||
-rw-r--r-- | ovn/northd/ovn-northd.c | 1 | ||||
-rw-r--r-- | ovn/ovn-nb.xml | 9 |
3 files changed, 12 insertions, 0 deletions
diff --git a/ovn/lib/ovn-l7.h b/ovn/lib/ovn-l7.h index a2224d019..fe3104e1f 100644 --- a/ovn/lib/ovn-l7.h +++ b/ovn/lib/ovn-l7.h @@ -73,6 +73,8 @@ struct gen_opts_map { #define DHCP_OPT_BOOTFILE DHCP_OPTION("bootfile_name", 67, "str") #define DHCP_OPT_WPAD DHCP_OPTION("wpad", 252, "str") #define DHCP_OPT_PATH_PREFIX DHCP_OPTION("path_prefix", 210, "str") +#define DHCP_OPT_TFTP_SERVER_ADDRESS \ + DHCP_OPTION("tftp_server_address", 150, "ipv4") static inline uint32_t gen_opt_hash(char *opt_name) diff --git a/ovn/northd/ovn-northd.c b/ovn/northd/ovn-northd.c index 1a59c9fa9..2843969f4 100644 --- a/ovn/northd/ovn-northd.c +++ b/ovn/northd/ovn-northd.c @@ -7389,6 +7389,7 @@ static struct gen_opts_map supported_dhcp_opts[] = { DHCP_OPT_WPAD, DHCP_OPT_BOOTFILE, DHCP_OPT_PATH_PREFIX, + DHCP_OPT_TFTP_SERVER_ADDRESS, }; static struct gen_opts_map supported_dhcpv6_opts[] = { diff --git a/ovn/ovn-nb.xml b/ovn/ovn-nb.xml index b084c821e..61a57110a 100644 --- a/ovn/ovn-nb.xml +++ b/ovn/ovn-nb.xml @@ -2178,6 +2178,15 @@ instead of deriving it from the bootfile name. </p> </column> + + <column name="options" key="tftp_server_address"> + <p> + The DHCPv4 option code for this option is 150. The option + contains one or more IPv4 addresses that the client MAY + use. This option is Cisco proprietary, the IEEE standard + that matches with this requirement is option 66 (tftp_server). + </p> + </column> </group> </group> |