[ovs-dev] [PATCH ovn] northd: do not run find_lrp_member_ip with empty nexthop

Numan Siddique numans at ovn.org
Tue Oct 5 14:29:30 UTC 2021


On Wed, Sep 22, 2021 at 6:49 AM Lorenzo Bianconi
<lorenzo.bianconi at redhat.com> wrote:
>
> Do not run find_lrp_member_ip in find_static_route_outport if the route
> has been configured without a valid nexthop. This patch fixes the
> following northd warning:
>
> 2021-09-18T06:01:37.909Z|00008|ovn_northd|WARN|bad ipv6 address
>
> Fixes: c00852288 ("northd: allow to configure routes with no nexthop")
> Reported-by: Jianlin Shi <jishi at redhat.com>
> Signed-off-by: Lorenzo Bianconi <lorenzo.bianconi at redhat.com>

Thanks for the fix.

I applied to the main branch and branch-21.09.

Numan

> ---
>  northd/northd.c | 8 ++++++--
>  1 file changed, 6 insertions(+), 2 deletions(-)
>
> diff --git a/northd/northd.c b/northd/northd.c
> index cf2467fe1..884a3a6c1 100644
> --- a/northd/northd.c
> +++ b/northd/northd.c
> @@ -8833,7 +8833,9 @@ find_static_route_outport(struct ovn_datapath *od, struct hmap *ports,
>                           route->output_port, route->ip_prefix);
>              return false;
>          }
> -        lrp_addr_s = find_lrp_member_ip(out_port, route->nexthop);
> +        if (strlen(route->nexthop)) {
> +            lrp_addr_s = find_lrp_member_ip(out_port, route->nexthop);
> +        }
>          if (!lrp_addr_s) {
>              /* There are no IP networks configured on the router's port via
>               * which 'route->nexthop' is theoretically reachable.  But since
> @@ -8863,7 +8865,9 @@ find_static_route_outport(struct ovn_datapath *od, struct hmap *ports,
>                  continue;
>              }
>
> -            lrp_addr_s = find_lrp_member_ip(out_port, route->nexthop);
> +            if (strlen(route->nexthop)) {
> +                lrp_addr_s = find_lrp_member_ip(out_port, route->nexthop);
> +            }
>              if (lrp_addr_s) {
>                  break;
>              }
> --
> 2.31.1
>
> _______________________________________________
> dev mailing list
> dev at openvswitch.org
> https://mail.openvswitch.org/mailman/listinfo/ovs-dev
>


More information about the dev mailing list