net: openvswitch: don't WARN on a non-IP packet that needs fragmenting
ovs_fragment() only handles IPv4 and IPv6 and drops any other packet
with a WARN_ONCE(). Since OVS_PACKET_CMD_EXECUTE takes the MRU from
userspace, any ethertype can get there, e.g. an MPLS packet executed by
an unprivileged user in its own user and network namespace:
Failed fragment ->ovs0: eth=8847, MRU=500, MTU=1500.
WARNING: net/openvswitch/actions.c:831 at ovs_fragment+0x239/0x840, CPU#1: test/106
Call Trace:
do_execute_actions+0x580e/0x7380
ovs_execute_actions+0xd3/0x3e0
ovs_packet_cmd_execute+0xc21/0x13c0
The packet is dropped either way, so use a rate-limited warning instead.
Fixes: 7f8a436eaa2c ("openvswitch: Add conntrack action")
Closes: https://lore.kernel.org/netdev/179492834266.3639154.14679778183890331729@gmail.com/
Signed-off-by: Kyuwon Cho <kyuwoncho18@gmail.com>
Reviewed-by: Aaron Conole <aconole@redhat.com>
Link: https://patch.msgid.link/179502509517.2983267.1652158471891914135@gmail.com
Signed-off-by: Paolo Abeni <pabeni@redhat.com>
1 file changed