From nobody Wed Feb 23 00:17:13 2022 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 5281019D4BF1; Wed, 23 Feb 2022 00:17:13 +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 4K3GnP1q3Nz4YpW; Wed, 23 Feb 2022 00:17:13 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1645575433; 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=wdHjjswDxhgyTUEEbF2vpupUlnwZGzQbL5ZtK44nUOg=; b=FQawEsT2cqLjVNNaBAy/pS8BpqIwHPd8QbZYtXWDsaeB4lLLb2Imf7MU1cvmxadmKWJAWp vFeSEdQjvXLyrG4mQMg1KlCueA76Bkm3fIAqt3ck3HiiRRYiH/IoVWcsL83icZPhbAlFJh HByI1BvprBN/6lRzQIgeuGpjczcSke+3iEraTIlOqKfFqPagKiSRzOxXAvnSZT9ManM7lM gJN1pBRlR9rWYgr7c9eRW+9DXOL40tTooUoPq6mlkd20yiIno3mI6MYQdbg9z7wCuH2Lf1 HgFHtzPczX+mc8vs8GLCqfNlBaGXuYBbh3b4rqGODQriOpnXzcVVDlL3TgX5YA== 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 1EBB6626C; Wed, 23 Feb 2022 00:17:13 +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 21N0HDXt079570; Wed, 23 Feb 2022 00:17:13 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 21N0HDbk079569; Wed, 23 Feb 2022 00:17:13 GMT (envelope-from git) Date: Wed, 23 Feb 2022 00:17:13 GMT Message-Id: <202202230017.21N0HDbk079569@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Michael Tuexen Subject: git: 03e166d6ea4d - stable/13 - sctp: cleanup, no functional change intended. 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: tuexen X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 03e166d6ea4dd67dab4379759758e60316884a58 Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1645575433; 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=wdHjjswDxhgyTUEEbF2vpupUlnwZGzQbL5ZtK44nUOg=; b=MNYVD7nkGmQrcW+d9HCf7beZc5jhAx/v1Eiyy9jciTw5VjMB39alDgOoMniMx9+uQ+VjDH nmwjnHkDnaNtVSJHMnU2/OhtB3XC9kIaip3hAPngVIqO1p3S1cn2Y4d+qxGUVWV3INGk0R 77r5siDs+s63/wt35WSDcy0bkwesgQt/3BQ2vNMFFyLxYYMfuw2YjylgFQHCDUihwe6qLj mXZ35KQ+fqAkOtFDcE7vzZjuC4vaUG6MN4M9VwBuARiOrC4ANLOrTq2eeYWmvGpZYzGKby LAiv0tJ2B7El1kMYZkX7QFzkX8HKXdwJ6RTmKMCr0M+CpVY4kjSVYs2VJySzzA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1645575433; a=rsa-sha256; cv=none; b=nrPY1jZM0tajTTCjL1zWsrWFv0568fo6e/k25LFgz6uloYnzuo3dfWwviRmUUNsQkMUgWz V3cBwsiDySCvaN2Jy2BoaiSraCaJLmZ8qvSnD02lG0YpbZZNNlkJ+2F3wDjZazkGRsSn+9 lwnf08ZfQMhGqXRgFcbAnBa8x/EKm7Qjmj8x4mRWuJEiXcis+dhP7SVVZIRxaOOcGTujJn A16sCHoaJBw0bfiM9d7GkcPhu9V96QtjTdfE9O0OzE7M3OoP+bi+5xuBElcLd/5c1YjvkA rfkMf1LlLp3Kk7fj1jy8HwwmFKvNIP8xbKAoWiSq6UuugRYDLvBqm0GTOKM7iA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch stable/13 has been updated by tuexen: URL: https://cgit.FreeBSD.org/src/commit/?id=03e166d6ea4dd67dab4379759758e60316884a58 commit 03e166d6ea4dd67dab4379759758e60316884a58 Author: Michael Tuexen AuthorDate: 2022-02-18 13:20:01 +0000 Commit: Michael Tuexen CommitDate: 2022-02-23 00:15:43 +0000 sctp: cleanup, no functional change intended. (cherry picked from commit 274a0e4a8d817d88ce7e3d40c4aad71db102c6ff) --- sys/netinet/sctp_os_bsd.h | 1 - sys/netinet/sctp_pcb.c | 7 ++++++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/sys/netinet/sctp_os_bsd.h b/sys/netinet/sctp_os_bsd.h index 4d2c40b59a4b..7d5cef6d5f09 100644 --- a/sys/netinet/sctp_os_bsd.h +++ b/sys/netinet/sctp_os_bsd.h @@ -315,7 +315,6 @@ typedef struct callout sctp_os_timer_t; /*************************/ #define SCTP_GATHER_MTU_FROM_IFN_INFO(ifn, ifn_index) ((struct ifnet *)ifn)->if_mtu #define SCTP_GATHER_MTU_FROM_ROUTE(sctp_ifa, sa, nh) ((uint32_t)((nh != NULL) ? nh->nh_mtu : 0)) -#define SCTP_GATHER_MTU_FROM_INTFC(sctp_ifn) ((sctp_ifn->ifn_p != NULL) ? ((struct ifnet *)(sctp_ifn->ifn_p))->if_mtu : 0) /*************************/ /* These are for logging */ diff --git a/sys/netinet/sctp_pcb.c b/sys/netinet/sctp_pcb.c index 632da61f6cf6..e0ac06f2f87e 100644 --- a/sys/netinet/sctp_pcb.c +++ b/sys/netinet/sctp_pcb.c @@ -3969,7 +3969,12 @@ sctp_add_remote_addr(struct sctp_tcb *stcb, struct sockaddr *newaddr, net->src_addr_selected = 1; /* Now get the interface MTU */ if (net->ro._s_addr->ifn_p != NULL) { - imtu = SCTP_GATHER_MTU_FROM_INTFC(net->ro._s_addr->ifn_p); + /* + * XXX: Should we here just use + * net->ro._s_addr->ifn_p->ifn_mtu + */ + imtu = SCTP_GATHER_MTU_FROM_IFN_INFO(net->ro._s_addr->ifn_p->ifn_p, + net->ro._s_addr->ifn_p->ifn_index); } else { imtu = 0; }