From patchwork Wed Sep 22 10:48:47 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Lorenzo Bianconi X-Patchwork-Id: 1531186 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@ozlabs.org Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (1024-bit key; unprotected) header.d=redhat.com header.i=@redhat.com header.a=rsa-sha256 header.s=mimecast20190719 header.b=DASyGh/s; dkim-atps=neutral Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=openvswitch.org (client-ip=140.211.166.136; helo=smtp3.osuosl.org; envelope-from=ovs-dev-bounces@openvswitch.org; receiver=) Received: from smtp3.osuosl.org (smtp3.osuosl.org [140.211.166.136]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 4HDw5X1Tbpz9sSn for ; Wed, 22 Sep 2021 20:49:03 +1000 (AEST) Received: from localhost (localhost [127.0.0.1]) by smtp3.osuosl.org (Postfix) with ESMTP id ECA85613CA; Wed, 22 Sep 2021 10:49:01 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from smtp3.osuosl.org ([127.0.0.1]) by localhost (smtp3.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id eIPIdMLvPdqP; Wed, 22 Sep 2021 10:49:01 +0000 (UTC) Received: from lists.linuxfoundation.org (lf-lists.osuosl.org [IPv6:2605:bc80:3010:104::8cd3:938]) by smtp3.osuosl.org (Postfix) with ESMTPS id 2C7B8607D7; Wed, 22 Sep 2021 10:49:00 +0000 (UTC) Received: from lf-lists.osuosl.org (localhost [127.0.0.1]) by lists.linuxfoundation.org (Postfix) with ESMTP id ED339C0011; Wed, 22 Sep 2021 10:48:59 +0000 (UTC) X-Original-To: ovs-dev@openvswitch.org Delivered-To: ovs-dev@lists.linuxfoundation.org Received: from smtp4.osuosl.org (smtp4.osuosl.org [140.211.166.137]) by lists.linuxfoundation.org (Postfix) with ESMTP id 8221BC000D for ; Wed, 22 Sep 2021 10:48:58 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by smtp4.osuosl.org (Postfix) with ESMTP id 7440540746 for ; Wed, 22 Sep 2021 10:48:58 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Authentication-Results: smtp4.osuosl.org (amavisd-new); dkim=pass (1024-bit key) header.d=redhat.com Received: from smtp4.osuosl.org ([127.0.0.1]) by localhost (smtp4.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id FewwSS7t6eOI for ; Wed, 22 Sep 2021 10:48:57 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.8.0 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [216.205.24.124]) by smtp4.osuosl.org (Postfix) with ESMTPS id 492BB40200 for ; Wed, 22 Sep 2021 10:48:57 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1632307735; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=azIOSYCiKLD+hY/p3dFMXNb6BMOj//l8AON52mcLprU=; b=DASyGh/sbjCPGyCEhHkj7l9R5YR6QjHpsiyYWYUgkImZMp9Hp3P1GZ6GiB/QsbKmVLxTUh T46w7sJ0sZD/1ySVTt+EZAMFV6ROnq5MnIOBuVPu0xj4KYD9DYYOkpDk3tBEDAquv+9rA3 KYsWDJWofr3vzkpDUiLQX6bnvjgxpbM= Received: from mail-ed1-f69.google.com (mail-ed1-f69.google.com [209.85.208.69]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-333-ur9_aU0JMMOyPfQtvfQd0g-1; Wed, 22 Sep 2021 06:48:54 -0400 X-MC-Unique: ur9_aU0JMMOyPfQtvfQd0g-1 Received: by mail-ed1-f69.google.com with SMTP id e7-20020a50d4c7000000b003d871ecccd8so2565764edj.18 for ; Wed, 22 Sep 2021 03:48:53 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=azIOSYCiKLD+hY/p3dFMXNb6BMOj//l8AON52mcLprU=; b=4tXtjba2yg7TDu5zuzlahM+JCEqBNz8gI9insuCKwwW8ysv+TDyYXFbqxlfcNkpqbV MhlTMx5m6VbjDp8HMSs8sx4k7VyeVIhG7VFeTf8qQHFieFmzCcfqZcmTmZtptqI8Ndf8 fvESClrm6sLzJilpYssV0IllrkLfYxS+3hhj+XRb7YLg/IJeZ1jegMwmuHzaTh7Tqyqa UlM6lg75euOiWhKEbPhTp+s8X7Py8/HB6xlLca1YO/YiZfkKANz/+QW6+akWug9SBjur Jfl2fCK8WFwFJy0pRoDdtn49jBBOmdExqpW7GbWvJ1Tqj7yD9JoxHCimmMuBybOCH/cz +7Qw== X-Gm-Message-State: AOAM530y2CsNVQfX7jEeWziJL2ZpChZfTIhrY3aJMM3oXi1ABz7afRZG mc19QH6DRa6byEy9Sp521y7/6Z/ws2o3AyIcKaUrZDRuJQDJXg6IsRD2piqD8L5ChJ1zpNtjfS0 JdgG3YuaCgO0x5yi4LvG18+S3BP++ExwLq2Lhta9GA+cJMVLYEHV3Tv8Xd4YbHiWk9eQiJmjW2Q D9yJJa X-Received: by 2002:a17:906:cc4b:: with SMTP id mm11mr41391403ejb.421.1632307732570; Wed, 22 Sep 2021 03:48:52 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwW+FXfeTQOHAP+DHtV3cSrjSqqTsVRWOLwUvpvL/icm/lxzPt1kwijSyFtMmJ5gt8cTUM2Og== X-Received: by 2002:a17:906:cc4b:: with SMTP id mm11mr41391379ejb.421.1632307732337; Wed, 22 Sep 2021 03:48:52 -0700 (PDT) Received: from lore-desk.redhat.com (net-130-25-199-50.cust.vodafonedsl.it. [130.25.199.50]) by smtp.gmail.com with ESMTPSA id r26sm878395ejd.85.2021.09.22.03.48.51 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 22 Sep 2021 03:48:51 -0700 (PDT) From: Lorenzo Bianconi To: ovs-dev@openvswitch.org Date: Wed, 22 Sep 2021 12:48:47 +0200 Message-Id: X-Mailer: git-send-email 2.31.1 MIME-Version: 1.0 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=lorenzo.bianconi@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Cc: jishi@redhat.com Subject: [ovs-dev] [PATCH ovn] northd: do not run find_lrp_member_ip with empty nexthop X-BeenThere: ovs-dev@openvswitch.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: ovs-dev-bounces@openvswitch.org Sender: "dev" 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 Signed-off-by: Lorenzo Bianconi --- 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; }