File tree Expand file tree Collapse file tree 1 file changed +6
-2
lines changed
Expand file tree Collapse file tree 1 file changed +6
-2
lines changed Original file line number Diff line number Diff line change @@ -61,7 +61,7 @@ static CALI_BPF_INLINE bool frags4_try_assemble(struct cali_tc_ctx *ctx)
6161
6262 if (!v ) {
6363 CALI_DEBUG ("Missing IP fragment at offset %d" , k .offset );
64- goto out ;
64+ return false ;
6565 }
6666
6767 tot_len += v -> len ;
@@ -73,7 +73,7 @@ static CALI_BPF_INLINE bool frags4_try_assemble(struct cali_tc_ctx *ctx)
7373 k .offset += v -> len ;
7474 }
7575
76- goto out ;
76+ return false ;
7777
7878assemble :
7979 CALI_DEBUG ("IP FRAG: Found all fragments!" );
@@ -166,6 +166,10 @@ static CALI_BPF_INLINE bool frags4_handle(struct cali_tc_ctx *ctx)
166166 int r_off = skb_l4hdr_offset (ctx );
167167 bool more_frags = bpf_ntohs (ip_hdr (ctx )-> frag_off ) & 0x2000 ;
168168
169+ /* When we get a fragment, it may be large than the storage in the map.
170+ * We may need to break it into multiple fragments to be able to store
171+ * it.
172+ */
169173 for (i = 0 ; i < 10 ; i ++ ) {
170174 int sz = MAX_FRAG ;
171175 if (r_off + sz >= ctx -> skb -> len ) {
You can’t perform that action at this time.
0 commit comments