Skip to content

Commit

Permalink
fix lint
Browse files Browse the repository at this point in the history
Signed-off-by: Okabe-Rintarou-0 <[email protected]>
  • Loading branch information
Okabe-Rintarou-0 committed Oct 24, 2024
1 parent 09a0dcc commit 2427a1d
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 1 addition & 1 deletion bpf/kmesh/ads/include/ctx/sock_ops.h
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ typedef struct bpf_sock_ops ctx_buff_t;
(ctx)->remote_port = (address)->port

#define MARK_REJECTED(ctx) \
BPF_LOG(INFO, KMESH, "mark reject"); \
BPF_LOG(DEBUG, KMESH, "mark reject"); \
(ctx)->remote_ip4 = 0; \
(ctx)->remote_port = 0
#else
Expand Down
2 changes: 2 additions & 0 deletions kernel/ko_src/kmesh/defer_connect.c
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,8 @@ static int defer_connect(struct sock *sk, struct msghdr *msg, size_t size)
daddr = sk->sk_daddr;
dport = sk->sk_dport;

// daddr == 0 && dport == 0 are special flags meaning the circuit breaker is open
// Should reject connection here
if (daddr == 0 && dport == 0) {
tcp_set_state(sk, TCP_CLOSE);
sk->sk_route_caps = 0;
Expand Down

0 comments on commit 2427a1d

Please sign in to comment.