From nobody Wed Jan 15 22:06:42 2025 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 4YYKpW0vtqz5kkDR; Wed, 15 Jan 2025 22:06:43 +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 "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4YYKpW08jKz3lsH; Wed, 15 Jan 2025 22:06:43 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1736978803; 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=uKru6bni5aRRSzhcR8WEk9SHF7pQJ7X5sOd96TAsbyg=; b=xM55OsweFBa2iCR94dJuoSZKOXmNxeBJFwuVUsF3dLuZ2ypN55R+zAvaXgwdQe4j0eBUtI sduQrA5bUJ4MXM9MPdOmUfhh7ERJw/4HwZEiyyue83Eg/dudApHvStvKZf5LytNjKMBjQh uON/JFRK/liHzRBOZCQWGUbPS90XwgtpEnQTc/95yK8mErMcZx5nsXxaf6cxMd+7U/ooeo XMmjivUM4P1gBRHcT5egJNp6n7RHKNST+foEwd+cAthZUnVdALEk55dzU2GoR/Os/xVEKB ikWciG2/YLLomxcpkgFD2nA3b79ErzNpIEiyGljHooiYLxJBVt0gCtoBpNkr8Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1736978803; 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=uKru6bni5aRRSzhcR8WEk9SHF7pQJ7X5sOd96TAsbyg=; b=XwpgpiWdqK4alK83duJ4x3inWBUpid4GukSkgWT2GNsfWRZHmFLCqF9/49ZqmXBDE7O7tf dyLQOFOsV41IiWtH5x5qtgPgYDY9eW2Zjrm/KzXIpnie5xnzKUZ44kbMF9CMS1k4dKRYzv tal15rt7PzXoxB02AJxKz0Wih7sgoR2T1BeW2kpZH/H8VEK8LLC6xMs3LUHW4JkKfi3S4O O+cyjUFgA0Q1xnGSqdz9+o2ZU4UvSswqfph7ADigxS37rho7iKt8duOJmUcozY6YI/h3Wq fyXMqbIdFqM9Oa0eX9efRVwJc2CukxiiZOyGy4jMpJcaOu/sQVheoXdJPO23mw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1736978803; a=rsa-sha256; cv=none; b=RIrBKrpwCoT7Del0UvOVnadqL3AtFc/X7X9h4v3nR/ZmoVYrp0IurCVFkqNLZJcY4xm41I BIIK2VrWGZc/cxL9XZACDQP0ZE/qzOxxDQc3wAxl2/gnycGs/QdIhsyZUNPAnoVsZFlSQy yfww09Edfz3Ii0NS8YT4qOCvT58hNTk32ISdwxe3hUqlKAkPXDlBRWhmkxQ1BSueWTIefh LVbvvGjMOEI9uwX6wHhK1sZrT1XYzfPFBXGHmYcnZk6h41hhxMx2yIb86NF9DCaekYDU8C IXcgMzwDEnYhV80DeGIcWI+su9Hi1Gi5K/DriRzxnzeecwxvT9IYC+XG///Wvg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none 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 4YYKpV6FP0z140w; Wed, 15 Jan 2025 22:06:42 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 50FM6gB3041768; Wed, 15 Jan 2025 22:06:42 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 50FM6gJ6041765; Wed, 15 Jan 2025 22:06:42 GMT (envelope-from git) Date: Wed, 15 Jan 2025 22:06:42 GMT Message-Id: <202501152206.50FM6gJ6041765@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Kristof Provost Subject: git: 2d2481c35f5a - main - pf: add extra SCTP multihoming probe points 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: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kp X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 2d2481c35f5a53322e982e47a2bb8f9085f525b7 Auto-Submitted: auto-generated The branch main has been updated by kp: URL: https://cgit.FreeBSD.org/src/commit/?id=2d2481c35f5a53322e982e47a2bb8f9085f525b7 commit 2d2481c35f5a53322e982e47a2bb8f9085f525b7 Author: Kristof Provost AuthorDate: 2025-01-08 21:23:17 +0000 Commit: Kristof Provost CommitDate: 2025-01-15 22:02:42 +0000 pf: add extra SCTP multihoming probe points Add probe points in the SCTP multihome parsing code. This is intended to help debug a multihome issue, and is expected to be generally useful, so will be included for everyone. MFC after: 2 weeks Sponsored by: Orange Business Services --- sys/netpfil/pf/pf.c | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/sys/netpfil/pf/pf.c b/sys/netpfil/pf/pf.c index 053b0b2ccb31..a49216a9dc20 100644 --- a/sys/netpfil/pf/pf.c +++ b/sys/netpfil/pf/pf.c @@ -140,6 +140,13 @@ SDT_PROBE_DEFINE2(pf, sctp, multihome, add, "uint32_t", "struct pf_sctp_source *"); SDT_PROBE_DEFINE3(pf, sctp, multihome, remove, "uint32_t", "struct pf_kstate *", "struct pf_sctp_source *"); +SDT_PROBE_DEFINE4(pf, sctp, multihome_scan, entry, "int", + "int", "struct pf_pdesc *", "int"); +SDT_PROBE_DEFINE2(pf, sctp, multihome_scan, param, "uint16_t", "uint16_t"); +SDT_PROBE_DEFINE2(pf, sctp, multihome_scan, ipv4, "struct in_addr *", + "int"); +SDT_PROBE_DEFINE2(pf, sctp, multihome_scan, ipv6, "struct in_addr6 *", + "int"); SDT_PROBE_DEFINE3(pf, eth, test_rule, entry, "int", "struct ifnet *", "struct mbuf *"); @@ -7493,6 +7500,8 @@ pf_multihome_scan(int start, int len, struct pf_pdesc *pd, int op) int off = 0; struct pf_sctp_multihome_job *job; + SDT_PROBE4(pf, sctp, multihome_scan, entry, start, len, pd, op); + while (off < len) { struct sctp_paramhdr h; @@ -7504,6 +7513,9 @@ pf_multihome_scan(int start, int len, struct pf_pdesc *pd, int op) if (ntohs(h.param_length) < 4) return (PF_DROP); + SDT_PROBE2(pf, sctp, multihome_scan, param, ntohs(h.param_type), + ntohs(h.param_length)); + switch (ntohs(h.param_type)) { case SCTP_IPV4_ADDRESS: { struct in_addr t; @@ -7533,6 +7545,8 @@ pf_multihome_scan(int start, int len, struct pf_pdesc *pd, int op) if (! job) return (PF_DROP); + SDT_PROBE2(pf, sctp, multihome_scan, ipv4, &t, op); + memcpy(&job->pd, pd, sizeof(*pd)); // New source address! @@ -7566,6 +7580,8 @@ pf_multihome_scan(int start, int len, struct pf_pdesc *pd, int op) if (! job) return (PF_DROP); + SDT_PROBE2(pf, sctp, multihome_scan, ipv6, &t, op); + memcpy(&job->pd, pd, sizeof(*pd)); memcpy(&job->src, &t, sizeof(t)); job->pd.src = &job->src; @@ -7616,6 +7632,7 @@ pf_multihome_scan(int start, int len, struct pf_pdesc *pd, int op) return (PF_PASS); } + int pf_multihome_scan_init(int start, int len, struct pf_pdesc *pd) {