From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: passt.top; dmarc=none (p=none dis=none) header.from=gibson.dropbear.id.au Authentication-Results: passt.top; dkim=pass (2048-bit key; secure) header.d=gibson.dropbear.id.au header.i=@gibson.dropbear.id.au header.a=rsa-sha256 header.s=202508 header.b=uW5GS8RX; dkim-atps=neutral Received: from mail.ozlabs.org (gandalf.ozlabs.org [150.107.74.76]) by passt.top (Postfix) with ESMTPS id A0EBE5A0271 for ; Fri, 12 Sep 2025 04:01:45 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gibson.dropbear.id.au; s=202508; t=1757642502; bh=DLsFGF9R6Q0BE1LEam3rgZD7X7u0EMGjdC6jLmi7QE0=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=uW5GS8RXMsaW6Ui6TSuN2RRERjAySVmLrRanrxS5fdjUjWGgxoofq6S4gE0qoRG9y Dxgtdh17Mjj1AxTluiUqhSCiK5n3CqCZAtodfj+dyUCBQcjzQlNOjat0fFFQ+G5bCi Hbu2lI9fQUV9Ro5hOd7YqJjtq5FvzkgFy3tjNhAGeYVpmOv8vP1C3N4EVa7rmHAUKK EJFeMrB2n5rLrLmny2CVgyyzfuKFj5sEdS+aVEdfBg0FpS0vfa8zn15VLL+ox2iKeo cFCT0rZGAPU97CimdcjNuNGiNoq6StEGr4Ze977D5SQuZQMm2EBr3Hlzd/enrCtGgm foDA8F5UdAJnA== Received: by gandalf.ozlabs.org (Postfix, from userid 1007) id 4cNHjL45Ccz4wBC; Fri, 12 Sep 2025 12:01:42 +1000 (AEST) Date: Fri, 12 Sep 2025 11:17:47 +1000 From: David Gibson To: Volker Diels-Grabsch Subject: Re: [PATCH v5 3/5] Introduce constant MAC_BROADCAST Message-ID: References: <20250911201900.237677-2-v@njh.eu> <20250911201900.237677-6-v@njh.eu> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="MRD7FfWM8qW1yC8S" Content-Disposition: inline In-Reply-To: <20250911201900.237677-6-v@njh.eu> Message-ID-Hash: GHM5SNQOBFTM7BNUJT3OF2JGCFWBLFDY X-Message-ID-Hash: GHM5SNQOBFTM7BNUJT3OF2JGCFWBLFDY X-MailFrom: dgibson@gandalf.ozlabs.org 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: --MRD7FfWM8qW1yC8S Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Thu, Sep 11, 2025 at 10:19:01PM +0200, Volker Diels-Grabsch wrote: > Signed-off-by: Volker Diels-Grabsch Reviewed-by: David Gibson > --- > tap.c | 2 +- > util.h | 2 ++ > 2 files changed, 3 insertions(+), 1 deletion(-) >=20 > diff --git a/tap.c b/tap.c > index d4d19eb..ba6d7b4 100644 > --- a/tap.c > +++ b/tap.c > @@ -1511,7 +1511,7 @@ void tap_backend_init(struct ctx *c) > * it sends us packets. Until then, use the broadcast address > * so that our first packets will have a chance to reach it. > */ > - memset(&c->guest_mac, 0xff, sizeof(c->guest_mac)); > + memcpy(&c->guest_mac, MAC_BROADCAST, sizeof(c->guest_mac)); > break; > } > =20 > diff --git a/util.h b/util.h > index 2a8c38f..22eaac5 100644 > --- a/util.h > +++ b/util.h > @@ -97,6 +97,8 @@ void abort_with_msg(const char *fmt, ...) > #define FD_PROTO(x, proto) \ > (IN_INTERVAL(c->proto.fd_min, c->proto.fd_max, (x))) > =20 > +#define MAC_BROADCAST \ > + ((uint8_t [ETH_ALEN]){ 0xff, 0xff, 0xff, 0xff, 0xff, 0xff }) > #define MAC_ZERO ((uint8_t [ETH_ALEN]){ 0 }) > #define MAC_IS_ZERO(addr) (!memcmp((addr), MAC_ZERO, ETH_ALEN)) > =20 > --=20 > 2.47.3 >=20 --=20 David Gibson (he or they) | I'll have my music baroque, and my code david AT gibson.dropbear.id.au | minimalist, thank you, not the other way | around. http://www.ozlabs.org/~dgibson --MRD7FfWM8qW1yC8S Content-Type: application/pgp-signature; name=signature.asc -----BEGIN PGP SIGNATURE----- iQIzBAEBCgAdFiEEO+dNsU4E3yXUXRK2zQJF27ox2GcFAmjDdLsACgkQzQJF27ox 2GfF3xAAo00b/Nawb8u6TySxRFZmPilMa9s8fpqsFUDgKbp6Q2aN6QhwUhaMIywW JnGY5o0OtT1zlrt10HA0rV23h0ujs3Sw9JnTlHBRwMu1OQVJBi5eU8PwzVb6+GFp BZbvVWwC4sUxyRXdmV/yL6ozGL24dYGNJJoBYYV5vrkl1Mg2pGwK1AvjZZJARb10 Qud2EWRnCinA2By/R/Ul4I5Z7LsLBSkhKpt/WpC8liEsBpMX8aAQE0T6bvAXx1CW fdDP6pQb7JlmvZB243joKVePlKtOrZvcCAiIaVorfqmFgYqtqERvE0kmpFYKhCc2 p+zIGha72njCr/h8YX06Lq54WEfQOiNdIiJKfm4sMFSsHSG7FKsDeAyX/s+bNohu V0eTlVmnBNHooKzySu8NE/ZsC4TvAHKm9NcBilou2IzZc1kIcaFgtRof13+d9oP9 BfleAPNvIzvgtnz0QJi6FiP5zmuO3zq50tu5wNBSfHb/U/L7g9l9zVFLXadUgVEe 8xYPA/jEzgiaCeBAMW/pVeDkY1x/4HHwIpes0GhHu1PNfbrOBwoRENBCXcJFwLbA l7FlDYFWK3Mv9OsqV3uGIbVTbvB8nVOfMe5R1RSQvcdOM/7RvosWhULyF4W9ZcHa vekQmWgZfF5B4AKwjq2uaxsn0vMPX2T0l4dowZIT0UjSel+UhDg= =BmdC -----END PGP SIGNATURE----- --MRD7FfWM8qW1yC8S--