Skip to content

Commit

Permalink
Fix up ipcache access in datapath
Browse files Browse the repository at this point in the history
This PR replaces the ipcache_lookup[46]() with lookup_ip[46]_remote_endpoint()
where the older kernel does not support it.

Fixes: #11351
Signed-off-by: Swaminathan Vasudevan <svasudevan@suse.com>
  • Loading branch information
soumynathan authored and tklauser committed May 21, 2020
1 parent ee55fa5 commit d7f58e8
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions bpf/bpf_lxc.c
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@
#include "lib/trace.h"
#include "lib/csum.h"
#include "lib/encap.h"
#include "lib/eps.h"
#include "lib/nat.h"
#include "lib/nodeport.h"
#include "lib/policy_log.h"
Expand Down Expand Up @@ -994,7 +995,7 @@ int tail_ipv6_to_endpoint(struct __ctx_buff *ctx)
union v6addr *src = (union v6addr *) &ip6->saddr;
struct remote_endpoint_info *info;

info = ipcache_lookup6(&IPCACHE_MAP, src, V6_CACHE_KEY_LEN);
info = lookup_ip6_remote_endpoint(src);
if (info != NULL) {
__u32 sec_label = info->sec_label;
if (sec_label) {
Expand Down Expand Up @@ -1213,7 +1214,7 @@ int tail_ipv4_to_endpoint(struct __ctx_buff *ctx)
if (identity_is_reserved(src_identity)) {
struct remote_endpoint_info *info;

info = ipcache_lookup4(&IPCACHE_MAP, ip4->saddr, V4_CACHE_KEY_LEN);
info = lookup_ip4_remote_endpoint(ip4->saddr);
if (info != NULL) {
__u32 sec_label = info->sec_label;
if (sec_label) {
Expand Down

0 comments on commit d7f58e8

Please sign in to comment.