Message ID | b1dacd1f521a44b4bb2de5104b90221499d54f61.1632307044.git.lorenzo.bianconi@redhat.com |
---|---|
State | Accepted |
Headers | show |
Series | [ovs-dev] northd: do not run find_lrp_member_ip with empty nexthop | expand |
Context | Check | Description |
---|---|---|
ovsrobot/apply-robot | success | apply and check: success |
ovsrobot/github-robot-_Build_and_Test | success | github build: passed |
ovsrobot/github-robot-_ovn-kubernetes | success | github build: passed |
On Wed, Sep 22, 2021 at 6:49 AM Lorenzo Bianconi <lorenzo.bianconi@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@redhat.com> > Signed-off-by: Lorenzo Bianconi <lorenzo.bianconi@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@openvswitch.org > https://mail.openvswitch.org/mailman/listinfo/ovs-dev >
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; }
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@redhat.com> Signed-off-by: Lorenzo Bianconi <lorenzo.bianconi@redhat.com> --- northd/northd.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-)