From nobody Mon Feb 19 02:55:44 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4TdRxD3Zfsz5452G; Mon, 19 Feb 2024 02:55:44 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (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 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4TdRxD30jnz4lh4; Mon, 19 Feb 2024 02:55:44 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1708311344; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=++YOmCAuDCYAZx0ZvR97DVmN29F/GPStyvGwPfjefN8=; b=u76L+oTmOwhuOU04XonKciQz6bQWxxaHz9Ukr37D1nvgmSG5k8XOP2XSXiw8dHEEfMX8Lp o3nAG/8s2Giae4Rxvh9RuFEjlJykDfVGiQfAIyuY4mIzLWc8qSPgp+Vay9pcC+cK+dawMu 8sq4lAC7DYk7IhjYWDGyFwUOspXcrup9Obf9U0iKKlDhJ+Ldmah4evDpDnzCBOn/SlplQQ SJgB4MudIq9da9uXLmeUkLr3+gp+EnkIAzulq/sGzuEnxuLl8GrH5e3BpIAuNyeuFjqFST 7XNu/ZnPebdhas7gwWc7xUF4bWvAWsuEOJafBm663/iOu7D6dHfe9lPg6PGD5g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1708311344; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=++YOmCAuDCYAZx0ZvR97DVmN29F/GPStyvGwPfjefN8=; b=ox79JZV2Q2J7yUxKwts97ofazqB18XqoDzI+drFxmRYZDFEkfrWXkwUXfG6/Rl0Q2GN6al +tAtgyrhila63RVzwCXTVxkyFWowehbuTJtZE2+y8EYwWaEzlsOcLD4AdlygCDwgqR57Rf +baehZtnq65cj7ZhUh8vtv9xjjwJpNxj+aLKuicjZz4CdkI8BlZ4OtsP0VwPt2/HyJvjAN vNwbXkaOium9O8YqAJixz57d/nAet4fpvX+t0zXCCsjJhEWltXZ/Pflr04RX3FmdhVMePc qIJADLVV6dFc9lSYDlbL2JUaxWj4gNxhFGAnuzkIjm2pfZZzMlnDjxmtoUZbcA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1708311344; a=rsa-sha256; cv=none; b=gc3yLOO6zXIYo/159QD5xGPwdtTZ+TIFk7zC4Mmyvhntqb8uKH2m6ys+sdYNm7Or0VzZZj esmT1OAPoee6qBObCu/hmZIM7EHIGruu2H8Ye50ChThh6sLyd8UTeJnoDU7M4a9E5VHKSc O3F/E5qCnP3YGGYXiVlEAYNGl3qFOdJ0Ozx1Q3XFeMXOEg3cXJ0Dllbvzmw9v47pbZYJCL Gmj2dnOqA2+WBOi7OPcmRRZ2yPN+vvg/P2B0Ou9isePjcg9MTr3DjrImKtFMQmUxAS0JWB yMBho/JuZz+Q9jOGUbyxWaJWMBFXvlnjBNW6uh8DqCPll78t8FhPaUgfo+i6PQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (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) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4TdRxD22J2zH4b; Mon, 19 Feb 2024 02:55:44 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 41J2ti9d089572; Mon, 19 Feb 2024 02:55:44 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 41J2ti42089569; Mon, 19 Feb 2024 02:55:44 GMT (envelope-from git) Date: Mon, 19 Feb 2024 02:55:44 GMT Message-Id: <202402190255.41J2ti42089569@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Warner Losh Subject: git: fcb6cac22397 - stable/13 - if_re: Generate an address if there is none in the EEPROM List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: imp X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: fcb6cac22397ecfc3fa9eaa9957a86a2fb639c8f Auto-Submitted: auto-generated The branch stable/13 has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=fcb6cac22397ecfc3fa9eaa9957a86a2fb639c8f commit fcb6cac22397ecfc3fa9eaa9957a86a2fb639c8f Author: Evgeni Golov AuthorDate: 2023-02-27 22:50:56 +0000 Commit: Warner Losh CommitDate: 2024-02-19 02:52:41 +0000 if_re: Generate an address if there is none in the EEPROM There exists hardware that has no ethernet address burned into the EEPROM. Loading if_re on such a HW brings the device up with '00:00:00:00:00:00' as the address, and that doesn't get you too far in a real network. PR: 262406 Reviewed by: imp Pull Request: https://github.com/freebsd/freebsd-src/pull/670 Signed-off-by: Evgeni Golov Differential Revision: https://reviews.freebsd.org/D34485 (cherry picked from commit 55747938b5c4c913f742fd03189f0c660ced7bef) --- sys/dev/re/if_re.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/sys/dev/re/if_re.c b/sys/dev/re/if_re.c index 0570f2574d37..95b43b5718cb 100644 --- a/sys/dev/re/if_re.c +++ b/sys/dev/re/if_re.c @@ -1678,6 +1678,11 @@ re_attach(device_t dev) goto fail; } + /* If address was not found, create one based on the hostid and name. */ + if (ETHER_IS_ZERO(eaddr)) { + ether_gen_addr(ifp, (struct ether_addr *)eaddr); + } + /* * Call MI attach routine. */