Skip to content

Commit

Permalink
bpf/pcap: Use CAPTURE{4,6}_RULES macros
Browse files Browse the repository at this point in the history
The CAPTURE{4,6}_RULES macros are defined but not used in the code.

Fixes: 9c47695 ("cilium: add wildcarded capture map representation")
Signed-off-by: Paul Chaignon <paul@cilium.io>
  • Loading branch information
pchaigno committed Jul 6, 2021
1 parent a6642cb commit 11145cd
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions bpf/lib/pcap.h
Original file line number Diff line number Diff line change
Expand Up @@ -246,7 +246,7 @@ cilium_capture4_classify_wcard(struct __ctx_buff *ctx)
_Pragma("unroll")
for (i = 0; i < size; i++) {
cilium_capture4_masked_key(&okey, &prefix_masks[i], &lkey);
match = map_lookup_elem(&cilium_capture4_rules, &lkey);
match = map_lookup_elem(&CAPTURE4_RULES, &lkey);
if (match)
return match;
}
Expand Down Expand Up @@ -371,7 +371,7 @@ cilium_capture6_classify_wcard(struct __ctx_buff *ctx)
_Pragma("unroll")
for (i = 0; i < size; i++) {
cilium_capture6_masked_key(&okey, &prefix_masks[i], &lkey);
match = map_lookup_elem(&cilium_capture6_rules, &lkey);
match = map_lookup_elem(&CAPTURE6_RULES, &lkey);
if (match)
return match;
}
Expand Down

0 comments on commit 11145cd

Please sign in to comment.