File tree Expand file tree Collapse file tree 1 file changed +6
-6
lines changed Expand file tree Collapse file tree 1 file changed +6
-6
lines changed Original file line number Diff line number Diff line change @@ -3112,6 +3112,9 @@ static struct sock *bpf_iter_tcp_resume_listening(struct seq_file *seq)
3112
3112
int resume_bucket = st -> bucket ;
3113
3113
struct sock * sk ;
3114
3114
3115
+ if (end_cookie && find_cookie == end_cookie )
3116
+ ++ st -> bucket ;
3117
+
3115
3118
sk = listening_get_first (seq );
3116
3119
iter -> cur_sk = 0 ;
3117
3120
iter -> end_sk = 0 ;
@@ -3139,6 +3142,9 @@ static struct sock *bpf_iter_tcp_resume_established(struct seq_file *seq)
3139
3142
int resume_bucket = st -> bucket ;
3140
3143
struct sock * sk ;
3141
3144
3145
+ if (end_cookie && find_cookie == end_cookie )
3146
+ ++ st -> bucket ;
3147
+
3142
3148
sk = established_get_first (seq );
3143
3149
iter -> cur_sk = 0 ;
3144
3150
iter -> end_sk = 0 ;
@@ -3162,12 +3168,6 @@ static struct sock *bpf_iter_tcp_resume(struct seq_file *seq)
3162
3168
struct tcp_iter_state * st = & iter -> state ;
3163
3169
struct sock * sk = NULL ;
3164
3170
3165
- /* Don't waste time finding the first socket in this bucket if we're
3166
- * already done with it.
3167
- */
3168
- if (iter -> end_sk && iter -> cur_sk == iter -> end_sk )
3169
- ++ st -> bucket ;
3170
-
3171
3171
switch (st -> state ) {
3172
3172
case TCP_SEQ_STATE_LISTENING :
3173
3173
sk = bpf_iter_tcp_resume_listening (seq );
You can’t perform that action at this time.
0 commit comments