-
Notifications
You must be signed in to change notification settings - Fork 156
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #599 from l1b0k/fix
fix networkpolicy and eni recycle problem
- Loading branch information
Showing
19 changed files
with
1,422 additions
and
1,952 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 | ||
From: l1b0k <[email protected]> | ||
Date: Thu, 11 Apr 2024 15:45:33 +0800 | ||
Subject: fix sec label | ||
|
||
Signed-off-by: l1b0k <[email protected]> | ||
--- | ||
bpf/bpf_host.c | 7 +++++++ | ||
1 file changed, 7 insertions(+) | ||
|
||
diff --git a/bpf/bpf_host.c b/bpf/bpf_host.c | ||
index e29bbc5c97..95d93e01aa 100644 | ||
--- a/bpf/bpf_host.c | ||
+++ b/bpf/bpf_host.c | ||
@@ -563,6 +563,13 @@ handle_ipv4(struct __ctx_buff *ctx, __u32 secctx, | ||
if (ep->flags & ENDPOINT_F_HOST) | ||
return CTX_ACT_OK; | ||
|
||
+#ifdef ENABLE_ROUTING | ||
+ info = lookup_ip4_remote_endpoint(ip4->saddr); | ||
+ if (info && info->sec_label) { | ||
+ return ipv4_local_delivery(ctx, ETH_HLEN, info->sec_label, ip4, ep, | ||
+ METRIC_INGRESS, from_host, false); | ||
+ } | ||
+#endif | ||
return ipv4_local_delivery(ctx, ETH_HLEN, secctx, ip4, ep, | ||
METRIC_INGRESS, from_host, false); | ||
} | ||
-- | ||
2.44.0 | ||
|
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.