lists.openwall.net | lists / announce owl-users owl-dev john-users john-dev passwdqc-users yescrypt popa3d-users / oss-security kernel-hardening musl sabotage tlsify passwords / crypt-dev xvendor / Bugtraq Full-Disclosure linux-kernel linux-netdev linux-ext4 linux-hardening linux-cve-announce PHC | |
Open Source and information security mailing list archives
| ||
|
Message-ID: <20221111130519.1459549-2-steen.hegelund@microchip.com> Date: Fri, 11 Nov 2022 14:05:14 +0100 From: Steen Hegelund <steen.hegelund@...rochip.com> To: "David S . Miller" <davem@...emloft.net>, Eric Dumazet <edumazet@...gle.com>, Jakub Kicinski <kuba@...nel.org>, Paolo Abeni <pabeni@...hat.com> CC: Steen Hegelund <steen.hegelund@...rochip.com>, <UNGLinuxDriver@...rochip.com>, Randy Dunlap <rdunlap@...radead.org>, "Casper Andersson" <casper.casan@...il.com>, Russell King <rmk+kernel@...linux.org.uk>, Wan Jiabing <wanjiabing@...o.com>, "Nathan Huckleberry" <nhuck@...gle.com>, <linux-kernel@...r.kernel.org>, <netdev@...r.kernel.org>, <linux-arm-kernel@...ts.infradead.org>, "Steen Hegelund" <Steen.Hegelund@...rochip.com>, Daniel Machon <daniel.machon@...rochip.com>, Horatiu Vultur <horatiu.vultur@...rochip.com>, Lars Povlsen <lars.povlsen@...rochip.com>, Simon Horman <simon.horman@...igine.com>, Louis Peens <louis.peens@...igine.com>, "Wojciech Drewek" <wojciech.drewek@...el.com>, Baowen Zheng <baowen.zheng@...igine.com>, Maksym Glubokiy <maksym.glubokiy@...ision.eu>, Pablo Neira Ayuso <pablo@...filter.org> Subject: [PATCH net-next 1/6] net: flow_offload: add support for ARP frame matching This adds a new flow_rule_match_arp function that allows drivers to be able to dissect ARP frames. Signed-off-by: Steen Hegelund <steen.hegelund@...rochip.com> --- include/net/flow_offload.h | 6 ++++++ net/core/flow_offload.c | 7 +++++++ 2 files changed, 13 insertions(+) diff --git a/include/net/flow_offload.h b/include/net/flow_offload.h index 7a60bc6d72c9..0400a0ac8a29 100644 --- a/include/net/flow_offload.h +++ b/include/net/flow_offload.h @@ -32,6 +32,10 @@ struct flow_match_vlan { struct flow_dissector_key_vlan *key, *mask; }; +struct flow_match_arp { + struct flow_dissector_key_arp *key, *mask; +}; + struct flow_match_ipv4_addrs { struct flow_dissector_key_ipv4_addrs *key, *mask; }; @@ -98,6 +102,8 @@ void flow_rule_match_vlan(const struct flow_rule *rule, struct flow_match_vlan *out); void flow_rule_match_cvlan(const struct flow_rule *rule, struct flow_match_vlan *out); +void flow_rule_match_arp(const struct flow_rule *rule, + struct flow_match_arp *out); void flow_rule_match_ipv4_addrs(const struct flow_rule *rule, struct flow_match_ipv4_addrs *out); void flow_rule_match_ipv6_addrs(const struct flow_rule *rule, diff --git a/net/core/flow_offload.c b/net/core/flow_offload.c index abe423fd5736..acfc1f88ea79 100644 --- a/net/core/flow_offload.c +++ b/net/core/flow_offload.c @@ -97,6 +97,13 @@ void flow_rule_match_cvlan(const struct flow_rule *rule, } EXPORT_SYMBOL(flow_rule_match_cvlan); +void flow_rule_match_arp(const struct flow_rule *rule, + struct flow_match_arp *out) +{ + FLOW_DISSECTOR_MATCH(rule, FLOW_DISSECTOR_KEY_ARP, out); +} +EXPORT_SYMBOL(flow_rule_match_arp); + void flow_rule_match_ipv4_addrs(const struct flow_rule *rule, struct flow_match_ipv4_addrs *out) { -- 2.38.1
Powered by blists - more mailing lists