Commit Graph

6 Commits

Author SHA1 Message Date
856ab8aca3 VPP-574: fix the MACIP ACLs blocking ARP traffic
The initial assumption was that the MACIP ACL classifier tables would be applied
after the classification of the traffic based on the ethertype, it turned out
to be untrue, but the fix in the code did not happen.

Add the ethertype to the mask, and the logic to create the ACL classifier tables
permitting the ARP ethertype with the correct payload.

Change-Id: I70236a8a723970c662ddaef6bc9fce93d2e630c1
Signed-off-by: Andrew Yourtchenko <ayourtch@gmail.com>
2017-01-03 15:48:39 +00:00
c9b20bc7a5 acl: make MACIP ACL apply/unapply/delete logic more robust
1. vnet_set_input_acl_intfc expects currently applied table ids to
   remove them properly, fixed that.
2. check if the interface has MACIP ACL applied before unapplying it
3. if applying MACIP ACL to interface that has one already applied,
   unapply that first.

These changes required also swapping the order of the add/del functions.

Change-Id: I179490371507b07e9dd8852000954156c318d98c
Signed-off-by: Andrew Yourtchenko <ayourtch@gmail.com>
2016-12-08 21:18:38 +00:00
6162e1e26b Fix incorrect creation of classifier entries for macip ACL
The is_ip6 flag was incorrectly set during classifier
table creation phase, which intermittently caused the mismatch
between the mask value and the match values, resulting
in dropped packets. Fix that.

Also get rid of the magic numbers in that part of the code.

Change-Id: I0606561e6b07e70a1aa733746b56ed0e91752c94
Signed-off-by: Andrew Yourtchenko <ayourtch@gmail.com>
2016-12-08 17:13:05 +00:00
cd06b72892 Fix coverity CIDs 157344, 157343, 157341, 157340, 157339, 157336
The macros used to verify the validity of sw_if_index passed in
the API calls have puzzled coverity.

Even though the issues are false positives, the checks are rather
simple, so edited them to avoid using the preprocessor macros,
it makes the code easier to follow.

Added the null check for 157336.

Change-Id: I24651346851215b236e53e682261e1f91219b381
Signed-off-by: Andrew Yourtchenko <ayourtch@gmail.com>
2016-12-07 12:20:07 +00:00
288e8930ee Make table chain deletion optional in classifier API (VPP-206)
Change-Id: If30c0f6d5de34943bc399b3412c2d10847538c3c
Signed-off-by: Juraj Sloboda <jsloboda@cisco.com>
2016-12-07 09:42:18 +00:00
b09167f33d acl: The ACL plugin.
This is the commit from the accumulated work in the github ACL branch,
to move it to gerrit.

Change-Id: I85a6b0df0d3dd3c3c7588e92a1e22c553e4b6ef7
Signed-off-by: Andrew Yourtchenko <ayourtch@gmail.com>
2016-12-06 08:18:53 +00:00