2
0
mirror of https://github.com/openvswitch/ovs synced 2025-08-31 22:35:15 +00:00

ovn: Modify the DHCPv4 router option to optional

Co-authored-by: Dong Jun <dongj@dtdream.com>
Signed-off-by: Dong Jun <dongj@dtdream.com>
Signed-off-by: Guoshuai Li <ligs@dtdream.com>
Acked-by: Numan Siddique <nusiddiq@redhat.com>
Signed-off-by: Ben Pfaff <blp@ovn.org>
This commit is contained in:
Guoshuai Li
2017-03-09 10:53:37 +08:00
committed by Ben Pfaff
parent fed8962aff
commit b89d25e569
3 changed files with 13 additions and 15 deletions

2
NEWS
View File

@@ -13,6 +13,8 @@ Post-v2.7.0
- The "learn" action now supports a "limit" option (see ovs-ofctl(8)).
- New support for multiple VLANs (802.1ad or "QinQ"), including a new
"dot1q-tunnel" port VLAN mode.
- OVN:
* Make the DHCPv4 router setting optional.
v2.7.0 - 21 Feb 2017
---------------------

View File

@@ -2279,11 +2279,9 @@ build_dhcpv4_action(struct ovn_port *op, ovs_be32 offer_ip,
&op->nbsp->dhcpv4_options->options, "server_mac");
const char *lease_time = smap_get(
&op->nbsp->dhcpv4_options->options, "lease_time");
const char *router = smap_get(
&op->nbsp->dhcpv4_options->options, "router");
if (!(server_ip && server_mac && lease_time && router)) {
/* "server_id", "server_mac", "lease_time" and "router" should be
if (!(server_ip && server_mac && lease_time)) {
/* "server_id", "server_mac" and "lease_time" should be
* present in the dhcp_options. */
static struct vlog_rate_limit rl = VLOG_RATE_LIMIT_INIT(1, 5);
VLOG_WARN_RL(&rl, "Required DHCPv4 options not defined for lport - %s",
@@ -2826,9 +2824,7 @@ build_acls(struct ovn_datapath *od, struct hmap *lflows)
&od->nbs->ports[i]->dhcpv4_options->options, "server_mac");
const char *lease_time = smap_get(
&od->nbs->ports[i]->dhcpv4_options->options, "lease_time");
const char *router = smap_get(
&od->nbs->ports[i]->dhcpv4_options->options, "router");
if (server_id && server_mac && lease_time && router) {
if (server_id && server_mac && lease_time) {
struct ds match = DS_EMPTY_INITIALIZER;
const char *actions =
has_stateful ? "ct_commit; next;" : "next;";

View File

@@ -1393,14 +1393,6 @@
The Ethernet address for the DHCP server to use.
</column>
<column name="options" key="router">
<p>
The IP address of a gateway for the client to use. This should be
in the subnet of the offered IP. The DHCPv4 option code for this
option is 3.
</p>
</column>
<column name="options" key="lease_time"
type='{"type": "integer", "minInteger": 0, "maxInteger": 4294967295}'>
<p>
@@ -1422,6 +1414,14 @@
DHCPv4 options and their codes.
</p>
<column name="options" key="router">
<p>
The IP address of a gateway for the client to use. This should be
in the subnet of the offered IP. The DHCPv4 option code for this
option is 3.
</p>
</column>
<column name="options" key="netmask">
<p>
The DHCPv4 option code for this option is 1.