From nobody Sun May 19 04:35:06 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of redhat.com designates 170.10.129.124 as permitted sender) client-ip=170.10.129.124; envelope-from=libvir-list-bounces@redhat.com; helo=us-smtp-delivery-124.mimecast.com; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 170.10.129.124 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=fail(p=none dis=none) header.from=gmail.com ARC-Seal: i=1; a=rsa-sha256; t=1674462303; cv=none; d=zohomail.com; s=zohoarc; b=POnR/+4vgWkujQFNsxusJNFm10aX8F2HJ4HsSaUe6KkofkQZqHNbCpHsvikUck9oov3HiWhWuoswXO/bUQDbqNdbyxlTw4olBzNB7nNa1NiJ/9mCsGxn+Nrwj+33FfqrJjFqmThJREcVPkz3MAwS+nfTROTDXVmMLBcHI8f95ME= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1674462303; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:Sender:Subject:To; bh=JLXhhjxmyfz9eca+c4yO+wqiSZV+0qSiMORVl42VPCo=; b=XrlwVp3KEYzfMy1kT6xF7j7cwnzo2n6EG3iYhLVi+Tfiv2zV9NeYSgJb8H9uAjRycWboHarbmrfYWgycBscTuxI5c077he3x0I998mLQhZdaHfPTRgRZmIguBfClX2DfrTmYYbuRrHkffP1XtOTKL+gEqLTCS3muDzu6QQ0IQzg= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 170.10.129.124 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=fail header.from= (p=none dis=none) Return-Path: Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by mx.zohomail.com with SMTPS id 1674462303205382.8628546936733; Mon, 23 Jan 2023 00:25:03 -0800 (PST) Received: from mimecast-mx02.redhat.com (mimecast-mx02.redhat.com [66.187.233.88]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-329-IZW3x_pJOI6BA5HCYp2OWg-1; Mon, 23 Jan 2023 03:24:56 -0500 Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.rdu2.redhat.com [10.11.54.3]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id C574F1991C42; Mon, 23 Jan 2023 08:24:53 +0000 (UTC) Received: from mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (unknown [10.30.29.100]) by smtp.corp.redhat.com (Postfix) with ESMTP id D1AA21121330; Mon, 23 Jan 2023 08:24:50 +0000 (UTC) Received: from mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (localhost [IPv6:::1]) by mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (Postfix) with ESMTP id 88BFA1946588; Mon, 23 Jan 2023 08:24:50 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.rdu2.redhat.com [10.11.54.4]) by mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (Postfix) with ESMTP id 91F0F1946586 for ; Sat, 21 Jan 2023 00:58:18 +0000 (UTC) Received: by smtp.corp.redhat.com (Postfix) id 484B42026D2A; Sat, 21 Jan 2023 00:58:18 +0000 (UTC) Received: from mimecast-mx02.redhat.com (mimecast04.extmail.prod.ext.rdu2.redhat.com [10.11.55.20]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 40E292026D68 for ; Sat, 21 Jan 2023 00:58:18 +0000 (UTC) Received: from us-smtp-1.mimecast.com (us-smtp-delivery-1.mimecast.com [207.211.31.120]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 20E59101A521 for ; Sat, 21 Jan 2023 00:58:18 +0000 (UTC) Received: from mail-qt1-f175.google.com (mail-qt1-f175.google.com [209.85.160.175]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_128_GCM_SHA256) id us-mta-265-0qIsHYBvNZS1p9VWh_xj3g-1; Fri, 20 Jan 2023 19:58:16 -0500 Received: by mail-qt1-f175.google.com with SMTP id j9so5584476qtv.4 for ; Fri, 20 Jan 2023 16:58:16 -0800 (PST) Received: from localhost.localdomain ([2602:fe2e:42:16:1cc5:1173:fc58:d45e]) by smtp.gmail.com with ESMTPSA id ej4-20020a05622a4f8400b003b693fe4427sm2658392qtb.90.2023.01.20.16.58.14 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Fri, 20 Jan 2023 16:58:14 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1674462302; h=from:from:sender:sender: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:list-id:list-help: list-unsubscribe:list-subscribe:list-post; bh=JLXhhjxmyfz9eca+c4yO+wqiSZV+0qSiMORVl42VPCo=; b=CIABbqCv0slFF7BlQppNvobp3pdN/D/RofEed9wuAs1b7WNw9VOaeECjO6xb4PgaJPEtgS L/AhaYgvmYq3Vx1Ys+vJbseo8ihuMXqh3Vxd+nOWXn1/X0LnKNWyeIi5LRvVLEJkOTUMxz UVFDbBeO86GngsGDzc/CZEDLm01o/t0= X-MC-Unique: IZW3x_pJOI6BA5HCYp2OWg-1 X-Original-To: libvir-list@listman.corp.redhat.com X-MC-Unique: 0qIsHYBvNZS1p9VWh_xj3g-1 X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=JLXhhjxmyfz9eca+c4yO+wqiSZV+0qSiMORVl42VPCo=; b=ARupXucEmgH95mEiMB3/2jHLdnMkpLkQ2KuuY57+BsvU5zHrfG4t1z8DLqg+oa+KGL nqaCVZ1NQK7uimagq1u00Tr52VzbTep94adIcOEDdH0LAj3rwzUieU0MRdrSqwFA4A9X ZZAuz5iBPB8gD/N+FNB2kKvZ229+dRYaRdLxnP79dU6wEVSbfcvJZajmzJEM16krOFKT abMUZk83KVGQ4tSAfpfO2t+2n9TIGGSzkIEIObOLlsdHKHT2B/PPyEbqJqvXIddWkesF KbR0oYIqCAJGeSFBa8pgk9TytpHL1994Ep513OJfQn7fqXhrTYwcC5eqc3elQcg9APQf VllQ== X-Gm-Message-State: AFqh2koEUKU1UCEmZdlYCT0EVP+8Wb+TS5EAIFJWDxdnbwPmmjcT4oHK cqKVbvtKJPCo5F8DK0Ew7kynqgSZl3lyfg== X-Google-Smtp-Source: AMrXdXvb1Up7W2QWhd8mMoz746Vi57Z8xoaLf2K3FvLIN2AYCIuDxx/m6IYFvdZW90Sb6LGEPjbJ6Q== X-Received: by 2002:ac8:1346:0:b0:3a8:2f65:6ccb with SMTP id f6-20020ac81346000000b003a82f656ccbmr25051762qtj.65.1674262695244; Fri, 20 Jan 2023 16:58:15 -0800 (PST) From: Brooks Swinnerton To: libvir-list@redhat.com Subject: [PATCH] network: Increase max route size when checking IPv6 forwarding Date: Fri, 20 Jan 2023 19:58:05 -0500 Message-Id: <20230121005805.55292-1-bswinnerton@gmail.com> MIME-Version: 1.0 X-Mimecast-Impersonation-Protect: Policy=CLT - Impersonation Protection Definition; Similar Internal Domain=false; Similar Monitored External Domain=false; Custom External Domain=false; Mimecast External Domain=false; Newly Observed Domain=false; Internal User Name=false; Custom Display Name List=false; Reply-to Address Mismatch=false; Targeted Threat Dictionary=false; Mimecast Threat Dictionary=false; Custom Threat Dictionary=false X-Scanned-By: MIMEDefang 3.1 on 10.11.54.4 X-Mailman-Approved-At: Mon, 23 Jan 2023 08:24:49 +0000 X-BeenThere: libvir-list@redhat.com X-Mailman-Version: 2.1.29 Precedence: list List-Id: Development discussions about the libvirt library & tools List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Brooks Swinnerton Errors-To: libvir-list-bounces@redhat.com Sender: "libvir-list" X-Scanned-By: MIMEDefang 3.1 on 10.11.54.3 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @redhat.com) X-ZM-MESSAGEID: 1674462303493100001 Content-Type: text/plain; charset="utf-8"; x-default="true" In d9ee51e, virNetDevIPCheckIPv6Forwarding was updated to walk the contents of /proc/net/ipv6_route so that it could check to see if the RTF_ADDRCONF was set on any IPv6 routes to ultimately determine if enabling forwarding would result in an error due to accept_ra=3D1 being set on the interface. The implementation added in that commit limited the number of routes that could be read from /proc/net/ipv6_route to 100_000, each with 150 characters. This is problematic for machines that have a full IPv6 routing table, as the IPv6 routing table has now grown to over 160_000 (it was closer to 100_000 at the time of that commit). This patch increases the maximum route size from 100_000 to 1_000_000. While a million routes is somewhat arbitrary, it's meant to be a value that can be supported for the forseeable future. APNIC, one of the five regional internet registries, recently published a forecast of IPv6 table growth which anticipates a worst-case growth to 1_000_000 in January of 2029. Signed-off-by: Brooks Swinnerton Reviewed-by: Michal Privoznik --- src/util/virnetdevip.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/util/virnetdevip.c b/src/util/virnetdevip.c index 2eacb64ebe..034b392ee7 100644 --- a/src/util/virnetdevip.c +++ b/src/util/virnetdevip.c @@ -529,7 +529,7 @@ virNetDevIPCheckIPv6Forwarding(void) char *cur; g_autofree char *buf =3D NULL; /* lines are 150 chars */ - enum {MAX_ROUTE_SIZE =3D 150*100000}; + enum {MAX_ROUTE_SIZE =3D 150*1000000}; /* This is /proc/sys/net/ipv6/conf/all/accept_ra */ int all_accept_ra =3D virNetDevIPGetAcceptRA(NULL); -- 2.39.1