Patch Detail
get:
Show a patch.
patch:
Update a patch.
put:
Update a patch.
GET /api/1.2/patches/2223429/?format=api
{ "id": 2223429, "url": "http://patchwork.ozlabs.org/api/1.2/patches/2223429/?format=api", "web_url": "http://patchwork.ozlabs.org/project/netfilter-devel/patch/20260415104707.55946-1-pablo@netfilter.org/", "project": { "id": 26, "url": "http://patchwork.ozlabs.org/api/1.2/projects/26/?format=api", "name": "Netfilter Development", "link_name": "netfilter-devel", "list_id": "netfilter-devel.vger.kernel.org", "list_email": "netfilter-devel@vger.kernel.org", "web_url": null, "scm_url": null, "webscm_url": null, "list_archive_url": "", "list_archive_url_format": "", "commit_url_format": "" }, "msgid": "<20260415104707.55946-1-pablo@netfilter.org>", "list_archive_url": null, "date": "2026-04-15T10:47:07", "name": "[nf] netfilter: xtables: restrict several matches to ipv4 and ipv6", "commit_ref": null, "pull_url": null, "state": "changes-requested", "archived": false, "hash": "66735528cd75e72b20697e561f1e7683b776a22a", "submitter": { "id": 1315, "url": "http://patchwork.ozlabs.org/api/1.2/people/1315/?format=api", "name": "Pablo Neira Ayuso", "email": "pablo@netfilter.org" }, "delegate": null, "mbox": "http://patchwork.ozlabs.org/project/netfilter-devel/patch/20260415104707.55946-1-pablo@netfilter.org/mbox/", "series": [ { "id": 499963, "url": "http://patchwork.ozlabs.org/api/1.2/series/499963/?format=api", "web_url": "http://patchwork.ozlabs.org/project/netfilter-devel/list/?series=499963", "date": "2026-04-15T10:47:07", "name": "[nf] netfilter: xtables: restrict several matches to ipv4 and ipv6", "version": 1, "mbox": "http://patchwork.ozlabs.org/series/499963/mbox/" } ], "comments": "http://patchwork.ozlabs.org/api/patches/2223429/comments/", "check": "pending", "checks": "http://patchwork.ozlabs.org/api/patches/2223429/checks/", "tags": {}, "related": [], "headers": { "Return-Path": "\n <netfilter-devel+bounces-11912-incoming=patchwork.ozlabs.org@vger.kernel.org>", "X-Original-To": [ "incoming@patchwork.ozlabs.org", "netfilter-devel@vger.kernel.org" ], "Delivered-To": "patchwork-incoming@legolas.ozlabs.org", "Authentication-Results": [ "legolas.ozlabs.org;\n\tdkim=pass (2048-bit key;\n unprotected) header.d=netfilter.org header.i=@netfilter.org\n header.a=rsa-sha256 header.s=2025 header.b=rzLoyTsm;\n\tdkim-atps=neutral", "legolas.ozlabs.org;\n spf=pass (sender SPF authorized) smtp.mailfrom=vger.kernel.org\n (client-ip=2600:3c0a:e001:db::12fc:5321; helo=sea.lore.kernel.org;\n envelope-from=netfilter-devel+bounces-11912-incoming=patchwork.ozlabs.org@vger.kernel.org;\n receiver=patchwork.ozlabs.org)", "smtp.subspace.kernel.org;\n\tdkim=pass (2048-bit key) header.d=netfilter.org header.i=@netfilter.org\n header.b=\"rzLoyTsm\"", "smtp.subspace.kernel.org;\n arc=none smtp.client-ip=217.70.190.124", "smtp.subspace.kernel.org;\n dmarc=none (p=none dis=none) header.from=netfilter.org", "smtp.subspace.kernel.org;\n spf=pass smtp.mailfrom=netfilter.org" ], "Received": [ "from sea.lore.kernel.org (sea.lore.kernel.org\n [IPv6:2600:3c0a:e001:db::12fc:5321])\n\t(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)\n\t key-exchange x25519 server-signature ECDSA (secp384r1) server-digest SHA384)\n\t(No client certificate requested)\n\tby legolas.ozlabs.org (Postfix) with ESMTPS id 4fwdCj5nB6z1yDF\n\tfor <incoming@patchwork.ozlabs.org>; Wed, 15 Apr 2026 20:48:17 +1000 (AEST)", "from smtp.subspace.kernel.org (conduit.subspace.kernel.org\n [100.90.174.1])\n\tby sea.lore.kernel.org (Postfix) with ESMTP id 051683036D5B\n\tfor <incoming@patchwork.ozlabs.org>; Wed, 15 Apr 2026 10:47:17 +0000 (UTC)", "from localhost.localdomain (localhost.localdomain [127.0.0.1])\n\tby smtp.subspace.kernel.org (Postfix) with ESMTP id 7B84434253B;\n\tWed, 15 Apr 2026 10:47:16 +0000 (UTC)", "from mail.netfilter.org (mail.netfilter.org [217.70.190.124])\n\t(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))\n\t(No client certificate requested)\n\tby smtp.subspace.kernel.org (Postfix) with ESMTPS id B46C6314B76\n\tfor <netfilter-devel@vger.kernel.org>; Wed, 15 Apr 2026 10:47:13 +0000 (UTC)", "from localhost.localdomain (mail-agni [217.70.190.124])\n\tby mail.netfilter.org (Postfix) with ESMTPSA id 32AB260177;\n\tWed, 15 Apr 2026 12:47:11 +0200 (CEST)" ], "ARC-Seal": "i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116;\n\tt=1776250036; cv=none;\n b=ZB4mTkcGiIfOfeuU86DOE4D8+GnywnmaOYQ9GwwFF4mxTmGsLKtZoPFKriwERZAa9bFybt74g7fuoavY1ZYiXAp1qfyWcXBH7YIpTIW6BYarpwLPN9icxmDHoPQSRaEi1j1dL1ivDcSiucZb4GDE6O41VlNQmUSkItZ3jks6Khk=", "ARC-Message-Signature": "i=1; a=rsa-sha256; d=subspace.kernel.org;\n\ts=arc-20240116; t=1776250036; c=relaxed/simple;\n\tbh=zre4LGf00RLwLfaD17aEHynkNwu4BAmfxv0aL3ttB3I=;\n\th=From:To:Cc:Subject:Date:Message-ID:MIME-Version;\n b=j5Qa3QOI/zfW3BfkqAR4x3aUljwC1PxPEKLw2c4uEDxaVgSSVh73aFQYbLcCgtXzvCHtNd/ZuUprC+MPayLKmO/bbGpJpBkQjrAjgASkWRkhCBxhW3F8cZkYbVw+3pG1Zs7BZ2x+fw+u25QY2PtqNI9NkgM3NJJt1RDfqlTHhl0=", "ARC-Authentication-Results": "i=1; smtp.subspace.kernel.org;\n dmarc=none (p=none dis=none) header.from=netfilter.org;\n spf=pass smtp.mailfrom=netfilter.org;\n dkim=pass (2048-bit key) header.d=netfilter.org header.i=@netfilter.org\n header.b=rzLoyTsm; arc=none smtp.client-ip=217.70.190.124", "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed; d=netfilter.org;\n\ts=2025; t=1776250031;\n\tbh=cgDCGzIr16YL9BibCxZpNEb97j6uNpU1e/ypiiD9Dhs=;\n\th=From:To:Cc:Subject:Date:From;\n\tb=rzLoyTsmeMv8WY6HmdgdlGwgPftm/J/aPKLzN+AcscY7LpC+BFyF+l2q25hbsDYx6\n\t BvtPowctcR7a8wKWl9Lq2BWH7tZ/JOuc6jCjpAozP1r932D77rtj9CncG2jxnJnwuW\n\t 9TalvovLQQVXm2+Bz4MGLi0NsJ/m1gV9ED8gKp3z/NfI97UZEsKKuJP0O/LfAxR81z\n\t uLzIlpSIEKVPkiA0bANUksGu1bHZ8Ruz938d9oWxYJxCeQTYgt5lYjDC6ZkwQgOZpe\n\t bSQnF4h8kbOI9OU94Ztkh/VVtli8uxt3Js/+8vcjj3mi5KjYKCRZAD3+08Aq3z/5N2\n\t Y7KkpbdDdqKfg==", "From": "Pablo Neira Ayuso <pablo@netfilter.org>", "To": "netfilter-devel@vger.kernel.org", "Cc": "fw@strlen.de", "Subject": "[PATCH nf] netfilter: xtables: restrict several matches to ipv4 and\n ipv6", "Date": "Wed, 15 Apr 2026 12:47:07 +0200", "Message-ID": "<20260415104707.55946-1-pablo@netfilter.org>", "X-Mailer": "git-send-email 2.47.3", "Precedence": "bulk", "X-Mailing-List": "netfilter-devel@vger.kernel.org", "List-Id": "<netfilter-devel.vger.kernel.org>", "List-Subscribe": "<mailto:netfilter-devel+subscribe@vger.kernel.org>", "List-Unsubscribe": "<mailto:netfilter-devel+unsubscribe@vger.kernel.org>", "MIME-Version": "1.0", "Content-Transfer-Encoding": "8bit" }, "content": "This is a partial revert of:\n\n ab4f21e6fb1c (\"netfilter: xtables: use NFPROTO_UNSPEC in more extensions\")\n\nto allow ipv4 and ipv6 only.\n\n- xt_mac\n- xt_owner\n- xt_physdev\n- xt_realm\n\nthese extensions are not used by ebtables in userspace.\n\nFixes: ab4f21e6fb1c (\"netfilter: xtables: use NFPROTO_UNSPEC in more extensions\")\nReported-by: \"Kito Xu (veritas501)\" <hxzene@gmail.com>\nSigned-off-by: Pablo Neira Ayuso <pablo@netfilter.org>\n---\n net/netfilter/xt_mac.c | 34 +++++++++++++++++++++++-----------\n net/netfilter/xt_owner.c | 37 +++++++++++++++++++++++++------------\n net/netfilter/xt_physdev.c | 29 +++++++++++++++++++----------\n net/netfilter/xt_realm.c | 31 +++++++++++++++++++++----------\n 4 files changed, 88 insertions(+), 43 deletions(-)", "diff": "diff --git a/net/netfilter/xt_mac.c b/net/netfilter/xt_mac.c\nindex 81649da57ba5..bd2354760895 100644\n--- a/net/netfilter/xt_mac.c\n+++ b/net/netfilter/xt_mac.c\n@@ -38,25 +38,37 @@ static bool mac_mt(const struct sk_buff *skb, struct xt_action_param *par)\n \treturn ret;\n }\n \n-static struct xt_match mac_mt_reg __read_mostly = {\n-\t.name = \"mac\",\n-\t.revision = 0,\n-\t.family = NFPROTO_UNSPEC,\n-\t.match = mac_mt,\n-\t.matchsize = sizeof(struct xt_mac_info),\n-\t.hooks = (1 << NF_INET_PRE_ROUTING) | (1 << NF_INET_LOCAL_IN) |\n-\t (1 << NF_INET_FORWARD),\n-\t.me = THIS_MODULE,\n+static struct xt_match mac_mt_reg[] __read_mostly = {\n+\t{\n+\t\t.name\t\t= \"mac\",\n+\t\t.family\t\t= NFPROTO_IPV4,\n+\t\t.match\t\t= mac_mt,\n+\t\t.matchsize\t= sizeof(struct xt_mac_info),\n+\t\t.hooks\t\t= (1 << NF_INET_PRE_ROUTING) |\n+\t\t\t\t (1 << NF_INET_LOCAL_IN) |\n+\t\t\t\t (1 << NF_INET_FORWARD),\n+\t\t.me\t\t= THIS_MODULE,\n+\t},\n+\t{\n+\t\t.name\t\t= \"mac\",\n+\t\t.family\t\t= NFPROTO_IPV6,\n+\t\t.match\t\t= mac_mt,\n+\t\t.matchsize\t= sizeof(struct xt_mac_info),\n+\t\t.hooks\t\t= (1 << NF_INET_PRE_ROUTING) |\n+\t\t\t\t (1 << NF_INET_LOCAL_IN) |\n+\t\t\t\t (1 << NF_INET_FORWARD),\n+\t\t.me\t\t= THIS_MODULE,\n+\t},\n };\n \n static int __init mac_mt_init(void)\n {\n-\treturn xt_register_match(&mac_mt_reg);\n+\treturn xt_register_matches(mac_mt_reg, ARRAY_SIZE(mac_mt_reg));\n }\n \n static void __exit mac_mt_exit(void)\n {\n-\txt_unregister_match(&mac_mt_reg);\n+\txt_unregister_matches(mac_mt_reg, ARRAY_SIZE(mac_mt_reg));\n }\n \n module_init(mac_mt_init);\ndiff --git a/net/netfilter/xt_owner.c b/net/netfilter/xt_owner.c\nindex 50332888c8d2..4786ea157269 100644\n--- a/net/netfilter/xt_owner.c\n+++ b/net/netfilter/xt_owner.c\n@@ -127,26 +127,39 @@ owner_mt(const struct sk_buff *skb, struct xt_action_param *par)\n \treturn true;\n }\n \n-static struct xt_match owner_mt_reg __read_mostly = {\n-\t.name = \"owner\",\n-\t.revision = 1,\n-\t.family = NFPROTO_UNSPEC,\n-\t.checkentry = owner_check,\n-\t.match = owner_mt,\n-\t.matchsize = sizeof(struct xt_owner_match_info),\n-\t.hooks = (1 << NF_INET_LOCAL_OUT) |\n-\t (1 << NF_INET_POST_ROUTING),\n-\t.me = THIS_MODULE,\n+static struct xt_match owner_mt_reg[] __read_mostly = {\n+\t{\n+\t\t.name = \"owner\",\n+\t\t.revision = 1,\n+\t\t.family = NFPROTO_IPV4,\n+\t\t.checkentry = owner_check,\n+\t\t.match = owner_mt,\n+\t\t.matchsize = sizeof(struct xt_owner_match_info),\n+\t\t.hooks = (1 << NF_INET_LOCAL_OUT) |\n+\t\t (1 << NF_INET_POST_ROUTING),\n+\t\t.me = THIS_MODULE,\n+\t},\n+\t{\n+\t\t.name = \"owner\",\n+\t\t.revision = 1,\n+\t\t.family = NFPROTO_IPV6,\n+\t\t.checkentry = owner_check,\n+\t\t.match = owner_mt,\n+\t\t.matchsize = sizeof(struct xt_owner_match_info),\n+\t\t.hooks = (1 << NF_INET_LOCAL_OUT) |\n+\t\t (1 << NF_INET_POST_ROUTING),\n+\t\t.me = THIS_MODULE,\n+\t}\n };\n \n static int __init owner_mt_init(void)\n {\n-\treturn xt_register_match(&owner_mt_reg);\n+\treturn xt_register_matches(owner_mt_reg, ARRAY_SIZE(owner_mt_reg));\n }\n \n static void __exit owner_mt_exit(void)\n {\n-\txt_unregister_match(&owner_mt_reg);\n+\txt_unregister_matches(owner_mt_reg, ARRAY_SIZE(owner_mt_reg));\n }\n \n module_init(owner_mt_init);\ndiff --git a/net/netfilter/xt_physdev.c b/net/netfilter/xt_physdev.c\nindex 343e65f377d4..130842c35c6f 100644\n--- a/net/netfilter/xt_physdev.c\n+++ b/net/netfilter/xt_physdev.c\n@@ -115,24 +115,33 @@ static int physdev_mt_check(const struct xt_mtchk_param *par)\n \treturn 0;\n }\n \n-static struct xt_match physdev_mt_reg __read_mostly = {\n-\t.name = \"physdev\",\n-\t.revision = 0,\n-\t.family = NFPROTO_UNSPEC,\n-\t.checkentry = physdev_mt_check,\n-\t.match = physdev_mt,\n-\t.matchsize = sizeof(struct xt_physdev_info),\n-\t.me = THIS_MODULE,\n+static struct xt_match physdev_mt_reg[] __read_mostly = {\n+\t{\n+\t\t.name\t\t= \"physdev\",\n+\t\t.family\t\t= NFPROTO_IPV4,\n+\t\t.checkentry\t= physdev_mt_check,\n+\t\t.match\t\t= physdev_mt,\n+\t\t.matchsize\t= sizeof(struct xt_physdev_info),\n+\t\t.me\t\t= THIS_MODULE,\n+\t},\n+\t{\n+\t\t.name\t\t= \"physdev\",\n+\t\t.family\t\t= NFPROTO_IPV6,\n+\t\t.checkentry\t= physdev_mt_check,\n+\t\t.match\t\t= physdev_mt,\n+\t\t.matchsize\t= sizeof(struct xt_physdev_info),\n+\t\t.me\t\t= THIS_MODULE,\n+\t},\n };\n \n static int __init physdev_mt_init(void)\n {\n-\treturn xt_register_match(&physdev_mt_reg);\n+\treturn xt_register_matches(physdev_mt_reg, ARRAY_SIZE(physdev_mt_reg));\n }\n \n static void __exit physdev_mt_exit(void)\n {\n-\txt_unregister_match(&physdev_mt_reg);\n+\txt_unregister_matches(physdev_mt_reg, ARRAY_SIZE(physdev_mt_reg));\n }\n \n module_init(physdev_mt_init);\ndiff --git a/net/netfilter/xt_realm.c b/net/netfilter/xt_realm.c\nindex 6df485f4403d..130ebe5d1c43 100644\n--- a/net/netfilter/xt_realm.c\n+++ b/net/netfilter/xt_realm.c\n@@ -27,24 +27,35 @@ realm_mt(const struct sk_buff *skb, struct xt_action_param *par)\n \treturn (info->id == (dst->tclassid & info->mask)) ^ info->invert;\n }\n \n-static struct xt_match realm_mt_reg __read_mostly = {\n-\t.name\t\t= \"realm\",\n-\t.match\t\t= realm_mt,\n-\t.matchsize\t= sizeof(struct xt_realm_info),\n-\t.hooks\t\t= (1 << NF_INET_POST_ROUTING) | (1 << NF_INET_FORWARD) |\n-\t\t\t (1 << NF_INET_LOCAL_OUT) | (1 << NF_INET_LOCAL_IN),\n-\t.family\t\t= NFPROTO_UNSPEC,\n-\t.me\t\t= THIS_MODULE\n+static struct xt_match realm_mt_reg[] __read_mostly = {\n+\t{\n+\t\t.name\t\t= \"realm\",\n+\t\t.match\t\t= realm_mt,\n+\t\t.matchsize\t= sizeof(struct xt_realm_info),\n+\t\t.hooks\t\t= (1 << NF_INET_POST_ROUTING) | (1 << NF_INET_FORWARD) |\n+\t\t\t\t (1 << NF_INET_LOCAL_OUT) | (1 << NF_INET_LOCAL_IN),\n+\t\t.family\t\t= NFPROTO_IPV4,\n+\t\t.me\t\t= THIS_MODULE\n+\t},\n+\t{\n+\t\t.name\t\t= \"realm\",\n+\t\t.match\t\t= realm_mt,\n+\t\t.matchsize\t= sizeof(struct xt_realm_info),\n+\t\t.hooks\t\t= (1 << NF_INET_POST_ROUTING) | (1 << NF_INET_FORWARD) |\n+\t\t\t\t (1 << NF_INET_LOCAL_OUT) | (1 << NF_INET_LOCAL_IN),\n+\t\t.family\t\t= NFPROTO_IPV6,\n+\t\t.me\t\t= THIS_MODULE\n+\t}\n };\n \n static int __init realm_mt_init(void)\n {\n-\treturn xt_register_match(&realm_mt_reg);\n+\treturn xt_register_matches(realm_mt_reg, ARRAY_SIZE(realm_mt_reg));\n }\n \n static void __exit realm_mt_exit(void)\n {\n-\txt_unregister_match(&realm_mt_reg);\n+\txt_unregister_matches(realm_mt_reg, ARRAY_SIZE(realm_mt_reg));\n }\n \n module_init(realm_mt_init);\n", "prefixes": [ "nf" ] }