acl-plugin: make the IPv4/IPv6 non-first fragment handling in line with ACL (VPP... 35/6035/2
authorAndrew Yourtchenko <ayourtch@gmail.com>
Tue, 4 Apr 2017 14:10:40 +0000 (14:10 +0000)
committerDamjan Marion <dmarion.lists@gmail.com>
Thu, 6 Apr 2017 15:30:21 +0000 (15:30 +0000)
commitd1b05647427c79cfd5322991bbe663fae65f37b5
treec7449b51cd46575c7978d8cac795b15a84f4163a
parent0eb2b16f95c0c43302be79a1c4df8b828ac97e37
acl-plugin: make the IPv4/IPv6 non-first fragment handling in line with ACL (VPP-682)

This fixes the previously-implicit "drop all non-first fragments" behavior
to be more in line with security rules: a non-first fragment is treated
for the purposes of matching the ACL as a packet with the port
match succeeding. This allows to change the behavior to permit
the fragmented packets for the default "permit specific rules"
ruleset, but also gives the flexibility to block the non-initial
fragments by inserting into the begining a bogus rule
which would deny the L4 traffic.

Also, add a knob which allows to potentially turn this behavior off
in case of a dire need (and revert to dropping all non-initial fragments),
via a debug CLI.

Change-Id: I546b372b65ff2157d9c68b1d32f9e644f1dd71b4
Signed-off-by: Andrew Yourtchenko <ayourtch@gmail.com>
(cherry picked from commit 9fc0c26c6b28fd6c8b8142ea52f52eafa7e8c7ac)
src/plugins/acl/acl.c
src/plugins/acl/acl.h
src/plugins/acl/fa_node.c
src/plugins/acl/fa_node.h
test/test_acl_plugin.py
test/test_acl_plugin_l2l3.py