On Tue, Mar 7, 2017 at 9:20 AM, Guoshuai Li <[email protected]> wrote:

> Co-authored-by: Dong Jun <[email protected]>
> Signed-off-by: Guoshuai Li <[email protected]>
> ---
>  NEWS                    |  2 ++
>  ovn/northd/ovn-northd.c | 10 +++-------
>  ovn/ovn-nb.xml          | 16 ++++++++--------
>  3 files changed, 13 insertions(+), 15 deletions(-)
>
> diff --git a/NEWS b/NEWS
> index ce9fe88..1698d39 100644
> --- a/NEWS
> +++ b/NEWS
> @@ -5,6 +5,8 @@ Post-v2.7.0
>         `egress_pkt_mark` OVSDB option.
>     - EMC insertion probability is reduced to 1% and is configurable via
>       the new 'other_config:emc-insert-inv-prob' option.
> +   - OVN:
> +     * Modify the DHCPV4 router option to optional in northbound
> databases.
>

​A minor nit. Could have been "DHCPv4".​


​Acked-by: Numan Siddique <[email protected]>

​


>  v2.7.0 - xx xxx xxxx
>  ---------------------
> diff --git a/ovn/northd/ovn-northd.c b/ovn/northd/ovn-northd.c
> index 03dc850..d844a60 100644
> --- a/ovn/northd/ovn-northd.c
> +++ b/ovn/northd/ovn-northd.c
> @@ -2191,11 +2191,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",
> @@ -2738,9 +2736,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;";
> diff --git a/ovn/ovn-nb.xml b/ovn/ovn-nb.xml
> index c5ebbea..a17d876 100644
> --- a/ovn/ovn-nb.xml
> +++ b/ovn/ovn-nb.xml
> @@ -1365,14 +1365,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>
> @@ -1394,6 +1386,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.
> --
> 2.10.1.windows.1
>
> _______________________________________________
> dev mailing list
> [email protected]
> https://mail.openvswitch.org/mailman/listinfo/ovs-dev
>
_______________________________________________
dev mailing list
[email protected]
https://mail.openvswitch.org/mailman/listinfo/ovs-dev

Reply via email to