From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: passt.top; dmarc=pass (p=quarantine dis=none) header.from=redhat.com Authentication-Results: passt.top; dkim=pass (1024-bit key; unprotected) header.d=redhat.com header.i=@redhat.com header.a=rsa-sha256 header.s=mimecast20190719 header.b=ciL71oZ+; dkim-atps=neutral Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by passt.top (Postfix) with ESMTPS id 112B95A0278 for ; Fri, 12 Sep 2025 08:23:51 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1757658230; 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: in-reply-to:in-reply-to:references:references; bh=ClvgWw9lT+XKyQtK7+/R867LpWF72xFBWa+ULlvyVcU=; b=ciL71oZ+Yf2ZTsCXfI8UFtwYbC52nFd2K4abeXIab/YSTkW1bLsiJd3W2pmDtQXgnOeamj vda8jG+mqDlIs5EVUuQ5J8n5+qK/ssSWPuX3ug2WP/GCOHaW0hqWkVn9hRtEUNCe2AidT0 OZ+Bh63XoJ5V128EJ9M66XQOmJMLU+A= Received: from mail-wm1-f71.google.com (mail-wm1-f71.google.com [209.85.128.71]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-149-bECkYknCNVCYTv9b-rlHFg-1; Fri, 12 Sep 2025 02:23:48 -0400 X-MC-Unique: bECkYknCNVCYTv9b-rlHFg-1 X-Mimecast-MFC-AGG-ID: bECkYknCNVCYTv9b-rlHFg_1757658227 Received: by mail-wm1-f71.google.com with SMTP id 5b1f17b1804b1-45de13167aaso14497415e9.1 for ; Thu, 11 Sep 2025 23:23:48 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1757658227; x=1758263027; h=content-transfer-encoding:mime-version:organization:references :in-reply-to:message-id:subject:cc:to:from:date:x-gm-message-state :from:to:cc:subject:date:message-id:reply-to; bh=ClvgWw9lT+XKyQtK7+/R867LpWF72xFBWa+ULlvyVcU=; b=wnBGaiL7QXGY1oL6QokcvW6sjgK53Vvymv2wkgUc2od2aIiJlBOXaJ9ay9YNQUwFpe CA7PdL8604hlJr9Koy68mUKH85WwU8q78H+YH8ymyR17W9/Q2fMmQKh+PXP1R9fB9eYU 1aClCHvFjnqMKFqtn+oJ4U3Tar/SPdSVU6xdRTcnxpyiC+D5LBJ5YfxTHh1pz3ie/P4q 7ChlBSeCud6bsRX1Wl2/ou2015iD0NdV9fx0szEfSWt+BrYX72Cm9n24TMlAsw6pOtaa iEuV3Qmi2+rrU7R2jWha7NY55GEjOOFDoRFcugN7DE7awSl3Jl7yAV85FaO/6hQ17nty M0qQ== X-Gm-Message-State: AOJu0YzcTV8NHvatxRzKruBFyhdowu/asvyujAK1sg/waX9wXsZ1yhOs bP2dLq2gnAEgZHoLluAInunszFoKicR/yc4hUr4ptMdU9xgX9l1+8aQJ6jwiXVf6NT0x2Dfdpyi Yk+Eq+O/kJPegZ6O9xUBm3P+/8yTTlEHrfRf0LdrwIAMN9+uJnGoItA== X-Gm-Gg: ASbGnctOq/YLTVGAZilcXY5pSZNIDQvjMgdH/zg5se0Pna6QOj7Y+OYGZPARYeiePCc rAiBtXQSOciRPzEJZNmaKOUlk/fjJOId541ohKTudPbv9KH3cgH4shvQ1te9ZI8yA1cPTvgTrr+ 8GZzDQuN9rPaNHsPgVrhzCdZV8guuXsf8MMGXHn1r6oNXZkhiw7KefxuDOZZc6Rh6oSVoo9/k4s B0xy0q1hRuDaLCc1KH04uCsHZ3bqidU6k45mGk+zfq0dDNFPbN/9LY/KLudLV3hVL7e7VN+P8mE qpVSQsf1FtHEJ7bEv9MDZvswMofKNLS9Nv3coSe6aYOin6aRLU0= X-Received: by 2002:a05:600c:4444:b0:45d:cfc6:5166 with SMTP id 5b1f17b1804b1-45f211e6101mr14285395e9.23.1757658227208; Thu, 11 Sep 2025 23:23:47 -0700 (PDT) X-Google-Smtp-Source: AGHT+IECCuxPI3ohqUlFE73neHjNOACtoTyQrxsPYT8jAG1BQfdd8hpGFmiCc377cA7HtIEUKdtlMA== X-Received: by 2002:a05:600c:4444:b0:45d:cfc6:5166 with SMTP id 5b1f17b1804b1-45f211e6101mr14285205e9.23.1757658226750; Thu, 11 Sep 2025 23:23:46 -0700 (PDT) Received: from maya.myfinge.rs (ifcgrfdd.trafficplex.cloud. [2a10:fc81:a806:d6a9::1]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-45e016b5cbcsm53175615e9.11.2025.09.11.23.23.46 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 11 Sep 2025 23:23:46 -0700 (PDT) Date: Fri, 12 Sep 2025 08:23:44 +0200 From: Stefano Brivio To: Volker Diels-Grabsch Subject: Re: [PATCH v4] Send an initial ARP and NDP request to resolve the guest IP address Message-ID: <20250912082344.01888466@elisabeth> In-Reply-To: References: <20250910113632.80620-2-v@njh.eu> <20250910113632.80620-4-v@njh.eu> <20250910163218.620bfef7@elisabeth> Organization: Red Hat X-Mailer: Claws Mail 4.2.0 (GTK 3.24.49; x86_64-pc-linux-gnu) MIME-Version: 1.0 X-Mimecast-Spam-Score: 0 X-Mimecast-MFC-PROC-ID: ryUAgtDoJcPTPf9xjQQXkoM_PYh58OkuB6JRGhDFhbc_1757658227 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Message-ID-Hash: HUSBR2722FZC7UAHGC4AJIU523OL2UCZ X-Message-ID-Hash: HUSBR2722FZC7UAHGC4AJIU523OL2UCZ X-MailFrom: sbrivio@redhat.com X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header CC: passt-dev@passt.top X-Mailman-Version: 3.3.8 Precedence: list List-Id: Development discussion and patches for passt Archived-At: Archived-At: List-Archive: List-Archive: List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: On Thu, 11 Sep 2025 21:47:56 +0200 Volker Diels-Grabsch wrote: > Stefano Brivio wrote: > > > memcpy(c->guest_mac, eh->h_source, ETH_ALEN); > > > + info("Guest MAC address: %s", eth_ntop(c->guest_mac, bufmac, sizeof(bufmac))); > > > > This is one line you can break easily instead. But I don't think it > > should be info(), otherwise the guest can happily spam system logs on > > the host. > > > > I'm undecided between suggesting debug() or trace(), because on one > > hand it's a rather relevant information (maybe say "New guest MAC > > address"?), on the other hand nothing prevents a guest from using a > > different MAC address every other frame, and make debugging with --debug > > impossible if this happens. > > For debugging this issue that message was extremely helpful, so I > strongly recommend to not hide it in trace(). I personally would > even like to keep it info(), but I'll demote it to debug() as you > request. I think you're right, it should ideally be info(), but as long as we don't have a mechanism to rate limit messages, we need to be mindful of potential denial of service vectors. System loggers will, in general, not limit us much. > > We don't have (yet) a generic rate limiting mechanism for prints. > > Maybe we could go with trace() for the moment, and the day we have it, > > switch this to a rate-limited debug() (or even info(), at that point). > > In the unlikely case a client really does spam us with an every > changing MAC address, we can still easily grep those messages out. ...unless we're using a log file (quite common if we debug) and we exceed the maximum size. There's a mandatory limit on it, again for security reasons, and once we exceed it we start overwriting entries. Of course, if we're debugging a specific issue in this sense, we can just increase the size limit, so debug() should be kind of fine as well. > I'll soon provide v5 of my patch. Thanks! I'll review it in a bit. -- Stefano