From nobody Wed Nov 29 16:37:47 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 4SgQ3b5G9Kz52wpj; Wed, 29 Nov 2023 16:37:47 +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 4SgQ3b4LkNz3G6V; Wed, 29 Nov 2023 16:37:47 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1701275867; 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=LrUrOBS/C9xjMM1EfHVCICz6xsQ+OSKVHBU6iaXJh0w=; b=uUb5UtxrbtMuZSH0EG85gs6EOuF9rLl5KqZHqSHohvy4nIxGnsIl/lpLVBDeEAf+JwQelY rv56i0gBsPdfp0r7+pbxFuLP95tGhoDnOVq6ZiLcJS4PsgIiqvxauajWAK7tJ7Ih/ud9nZ aqcqg6LTNkWQJX3ifTt/vYmebCrigAw0aXCU3Ht9M9hWc79G4lLsKDRkXmynlOrLVa7tdM diL5NdMbDPqJDBd2DZHm4K+CW8EIaJX+xnA9PL36XjqWLV8MfotZjzlPwUweNQNZ0YdBs/ N2LnWl2cu44NzsfngbWC3KW25tXADf8MiLdYJzLgeix/81NQ0/U8THSgEqV97A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1701275867; 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=LrUrOBS/C9xjMM1EfHVCICz6xsQ+OSKVHBU6iaXJh0w=; b=SQCAQnx90MNKB6AA0LJV/pP5ILJPBb5y5DScvYqrPW3HnUpC+qUmBBrQ9Q7V2/UYe5Udqq ZZzGKAagsKIb//FXzGJLaIZsfDKLpsPDDQM/bD4LKTSh3gfgIkQbk+aeKQfv7xkWoNmAwn 2CTURLSr1yvbEVW6v/thkqWNsquCVrtwvQ4XEqyVbcdfKMLVCknrnWl+m6vxru7s5QUxut 7SXsr3D8999CfzaDRLCSQvxroIE/SKD6OQwVDN91iAG9kAxJ6M5HeB74bAscAbiR4W2X2A tFtC1AjTONM3XilNMZ7sp8tm4Pz87SqTS5wXRCY9St6FXaPXVFYfXPAtJpMIfw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1701275867; a=rsa-sha256; cv=none; b=c8NbMs0K6TFTNG/wmvmCypZaatbFqF+lejHvSsEAAZLmWMjPjitVJ2gkROQMCNxlj7z9dI HiigEaK9OrvGqV5YZ92YVOO+TGAuCGGoIyVZYdwVKquM0isbRZB0z0eI5RS5vGBo3Cdrye uJY+GYSiUhSiqLOr04rCi/dn+gYTpP7eiiCbk90qI0tpO/3gHIqT8+R616M1b1HF/uh38M 3cLWJd17s2t/w43lE7znG3v6Kt3PCnEIpi9nv7Qi9AUtwGjLgvmOAyRWd/aY4GRo5N0JH3 Oq7OJQNP4ZNdmDtYXVa3K0EFeKBd150FaR5tzxonABqIkVuXXaMYekgfjzTLyw== 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 4SgQ3b3JFWz1CZv; Wed, 29 Nov 2023 16:37:47 +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 3ATGbllH044150; Wed, 29 Nov 2023 16:37:47 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 3ATGblma044147; Wed, 29 Nov 2023 16:37:47 GMT (envelope-from git) Date: Wed, 29 Nov 2023 16:37:47 GMT Message-Id: <202311291637.3ATGblma044147@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: "Bjoern A. Zeeb" Subject: git: e53573cb3987 - stable/13 - net80211: improve error handling from ieee80211_parse_beacon() 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: bz X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: e53573cb3987f7841c81f7222559369efee59cae Auto-Submitted: auto-generated The branch stable/13 has been updated by bz: URL: https://cgit.FreeBSD.org/src/commit/?id=e53573cb3987f7841c81f7222559369efee59cae commit e53573cb3987f7841c81f7222559369efee59cae Author: Bjoern A. Zeeb AuthorDate: 2022-04-07 20:50:39 +0000 Commit: Bjoern A. Zeeb CommitDate: 2023-11-29 16:36:03 +0000 net80211: improve error handling from ieee80211_parse_beacon() Following up on fb8c87b4f3bfdfac014f9d894fe75fbad0391b24, which was supposed to go into all supported branches, increase ieee80211_scanparams status field from 8bit to 32bit (enum size) and add a dedicated error code for Mesh ID. Sponsored by: The FreeBSD Foundation (cherry picked from commit 7354782698f1cf5d6b368a9b1e65cfe3ee7f235c) --- sys/net80211/ieee80211_input.c | 2 +- sys/net80211/ieee80211_scan.h | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/sys/net80211/ieee80211_input.c b/sys/net80211/ieee80211_input.c index 4b17ab1188ef..492a3038c971 100644 --- a/sys/net80211/ieee80211_input.c +++ b/sys/net80211/ieee80211_input.c @@ -743,7 +743,7 @@ ieee80211_parse_beacon(struct ieee80211_node *ni, struct mbuf *m, #ifdef IEEE80211_SUPPORT_MESH if (scan->meshid != NULL) { IEEE80211_VERIFY_ELEMENT(scan->meshid, IEEE80211_MESHID_LEN, - scan->status |= IEEE80211_BPARSE_RATES_INVALID); + scan->status |= IEEE80211_BPARSE_MESHID_INVALID); } #endif /* diff --git a/sys/net80211/ieee80211_scan.h b/sys/net80211/ieee80211_scan.h index c140ac615979..4274f3948db6 100644 --- a/sys/net80211/ieee80211_scan.h +++ b/sys/net80211/ieee80211_scan.h @@ -210,6 +210,7 @@ enum { IEEE80211_BPARSE_OFFCHAN = 0x20, /* DSPARMS chan != curchan */ IEEE80211_BPARSE_BINTVAL_INVALID= 0x40, /* invalid beacon interval */ IEEE80211_BPARSE_CSA_INVALID = 0x80, /* invalid CSA ie */ + IEEE80211_BPARSE_MESHID_INVALID = 0x100, /* invalid Mesh ID ie */ }; /* @@ -220,7 +221,7 @@ enum { * All multi-byte values must be in host byte order. */ struct ieee80211_scanparams { - uint8_t status; /* bitmask of IEEE80211_BPARSE_* */ + uint32_t status; /* bitmask of IEEE80211_BPARSE_* */ uint8_t chan; /* channel # from FH/DSPARMS */ uint8_t bchan; /* curchan's channel # */ uint8_t fhindex;