From nobody Mon Feb 27 22:56:08 2023 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 4PQbT44WFLz3tHQN; Mon, 27 Feb 2023 22:56:08 +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 4PQbT441TGz3sPy; Mon, 27 Feb 2023 22:56:08 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1677538568; 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=vo+pb2Ot62uvcep2WxaZAaL4iYXasHKTXpL7CfzirTM=; b=H0ghBHZwN4OXV24EuhxuhfUSPDDfUnRxKTTH0FaaYV1Bp+fwfmjQFBWhdNFJZ2sr2kCKxK D2JaTqUh0lDGZtrzMEg80F142LOa2BjpfrzgFhXMKjqnuvq0mKty9sWVpDgiBileF6g+yL va7LXhqhwQeQcBULlQ04Jym/IO9kZeqVAb180eK1ufhNmCJCVjSsTBcLU2tvCSylkE+7Fg zQUU3HP0DkkymTxqFSlXZmKAGXkjm09nrT4PwPzkQcV0RlTViem4OIHJGS2hqxcxk0ROYz uEn2PHfnJEDJscI4B6ZE7F4T5FNAQM/u4zWhz9elK5QTPMisY2LvjKRVP+dlmw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1677538568; 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=vo+pb2Ot62uvcep2WxaZAaL4iYXasHKTXpL7CfzirTM=; b=Ltdkr2xBWFUVYssrpEXnuRGXVGWjYGtGGcLNjs5EoexN9p+LRhNeup7dCkN4uqrKDqNwr2 dwi7GW1BfeA8N+4NUD/aFrtTn/nyeLB04mQbvsK05XCaqmhVctNtJN6faFrsGLteMWYhdA jNT/emQBqExWZtuY1iuI0+7r7bTScGtQ8wYGB7B/aafnSjQKqdC7qUd8YkbweOnYgDkLyq fg8ICZP3XmeeK7Em38I4yEI0nJJyHEDgEaUEMJQUXxd5/eWWU2KyTBM32gg3Se+kQenkQL 4Jgpsd1LN1c+yPDQal1Cf/GdqonSTIRMR5NGqRVtN0hlhnWbNB90bB2ifWvCpA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1677538568; a=rsa-sha256; cv=none; b=aPYyKmsAFFeN0azpdRvACOdXG0EKyJe7lvjDP4VWr7m+mB5MF2o2Vv4FmRKCWlK5NLQZjh 1KmuQLLYOU5u7tfDEEbwB7RFFNF4VCCs6Tzp6OsF8Tw7V8KzDD93YzcZIBcfsBKghiPQpm mvDHZLOJTAA0p3RAjPBCuRn/wx/olvSfHPVEQmNoHU+/netJV6Gw7qbkOiLSyaDWIerZWb aOtkJLUZALobDtmY/Tm6c9Da4rBS7G5dWISgQwOV242VLtqaB8iYvwCKEBdy4j6ueApFup VJOqYKfETEii6TRPQzOTOs96pT08gwxoF9fYneihDHkEM0Sf1tTraA0GfcHoMA== 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 4PQbT435D9zklr; Mon, 27 Feb 2023 22:56:08 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 31RMu8eh094613; Mon, 27 Feb 2023 22:56:08 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 31RMu8LD094612; Mon, 27 Feb 2023 22:56:08 GMT (envelope-from git) Date: Mon, 27 Feb 2023 22:56:08 GMT Message-Id: <202302272256.31RMu8LD094612@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Warner Losh Subject: git: 55747938b5c4 - main - 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/main X-Git-Reftype: branch X-Git-Commit: 55747938b5c4c913f742fd03189f0c660ced7bef Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=55747938b5c4c913f742fd03189f0c660ced7bef commit 55747938b5c4c913f742fd03189f0c660ced7bef Author: Evgeni Golov AuthorDate: 2023-02-27 22:50:56 +0000 Commit: Warner Losh CommitDate: 2023-02-27 22:51:27 +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 --- 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 aaf3860fcc48..734760898e55 100644 --- a/sys/dev/re/if_re.c +++ b/sys/dev/re/if_re.c @@ -1674,6 +1674,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. */