mirror of
https://github.com/openvswitch/ovs
synced 2025-09-04 08:15:25 +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:
2
NEWS
2
NEWS
@@ -13,6 +13,8 @@ Post-v2.7.0
|
|||||||
- The "learn" action now supports a "limit" option (see ovs-ofctl(8)).
|
- The "learn" action now supports a "limit" option (see ovs-ofctl(8)).
|
||||||
- New support for multiple VLANs (802.1ad or "QinQ"), including a new
|
- New support for multiple VLANs (802.1ad or "QinQ"), including a new
|
||||||
"dot1q-tunnel" port VLAN mode.
|
"dot1q-tunnel" port VLAN mode.
|
||||||
|
- OVN:
|
||||||
|
* Make the DHCPv4 router setting optional.
|
||||||
|
|
||||||
v2.7.0 - 21 Feb 2017
|
v2.7.0 - 21 Feb 2017
|
||||||
---------------------
|
---------------------
|
||||||
|
@@ -2279,11 +2279,9 @@ build_dhcpv4_action(struct ovn_port *op, ovs_be32 offer_ip,
|
|||||||
&op->nbsp->dhcpv4_options->options, "server_mac");
|
&op->nbsp->dhcpv4_options->options, "server_mac");
|
||||||
const char *lease_time = smap_get(
|
const char *lease_time = smap_get(
|
||||||
&op->nbsp->dhcpv4_options->options, "lease_time");
|
&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)) {
|
if (!(server_ip && server_mac && lease_time)) {
|
||||||
/* "server_id", "server_mac", "lease_time" and "router" should be
|
/* "server_id", "server_mac" and "lease_time" should be
|
||||||
* present in the dhcp_options. */
|
* present in the dhcp_options. */
|
||||||
static struct vlog_rate_limit rl = VLOG_RATE_LIMIT_INIT(1, 5);
|
static struct vlog_rate_limit rl = VLOG_RATE_LIMIT_INIT(1, 5);
|
||||||
VLOG_WARN_RL(&rl, "Required DHCPv4 options not defined for lport - %s",
|
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");
|
&od->nbs->ports[i]->dhcpv4_options->options, "server_mac");
|
||||||
const char *lease_time = smap_get(
|
const char *lease_time = smap_get(
|
||||||
&od->nbs->ports[i]->dhcpv4_options->options, "lease_time");
|
&od->nbs->ports[i]->dhcpv4_options->options, "lease_time");
|
||||||
const char *router = smap_get(
|
if (server_id && server_mac && lease_time) {
|
||||||
&od->nbs->ports[i]->dhcpv4_options->options, "router");
|
|
||||||
if (server_id && server_mac && lease_time && router) {
|
|
||||||
struct ds match = DS_EMPTY_INITIALIZER;
|
struct ds match = DS_EMPTY_INITIALIZER;
|
||||||
const char *actions =
|
const char *actions =
|
||||||
has_stateful ? "ct_commit; next;" : "next;";
|
has_stateful ? "ct_commit; next;" : "next;";
|
||||||
|
@@ -1393,14 +1393,6 @@
|
|||||||
The Ethernet address for the DHCP server to use.
|
The Ethernet address for the DHCP server to use.
|
||||||
</column>
|
</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"
|
<column name="options" key="lease_time"
|
||||||
type='{"type": "integer", "minInteger": 0, "maxInteger": 4294967295}'>
|
type='{"type": "integer", "minInteger": 0, "maxInteger": 4294967295}'>
|
||||||
<p>
|
<p>
|
||||||
@@ -1422,6 +1414,14 @@
|
|||||||
DHCPv4 options and their codes.
|
DHCPv4 options and their codes.
|
||||||
</p>
|
</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">
|
<column name="options" key="netmask">
|
||||||
<p>
|
<p>
|
||||||
The DHCPv4 option code for this option is 1.
|
The DHCPv4 option code for this option is 1.
|
||||||
|
Reference in New Issue
Block a user