Skip to content

Commit 68ae3c5

Browse files
yuanchaoakylewanginchina
authored andcommitted
Fix: the issue with the first path matching error
1 parent d3a37c4 commit 68ae3c5

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

agent/src/common/matched_field.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -223,13 +223,13 @@ impl<const N: usize> MatchedFieldN<N> {
223223
for b in bits {
224224
let b = *b;
225225
if b < 8 * N {
226-
self.src_ip[b >> 3] = 1 << (b & 7);
226+
self.src_ip[b >> 3] |= 1 << (b & 7);
227227
} else if b < 8 * 2 * N {
228228
let b = b - 8 * N;
229-
self.dst_ip[b >> 3] = 1 << (b & 7);
229+
self.dst_ip[b >> 3] |= 1 << (b & 7);
230230
} else if b < 8 * (2 * N + 10) {
231231
let b = b - 8 * 2 * N;
232-
self.others[b >> 3] = 1 << (b & 7);
232+
self.others[b >> 3] |= 1 << (b & 7);
233233
} else {
234234
panic!("bits({:?}) out of bounds", bits)
235235
}

0 commit comments

Comments
 (0)