Skip to content

Commit 1fb2c28

Browse files
rmalmainriesentoaster
authored andcommitted
Discard no tc mm (follow-up) (#2584)
* forgot to set the flags
1 parent 5149ba9 commit 1fb2c28

File tree

1 file changed

+9
-7
lines changed

1 file changed

+9
-7
lines changed

libafl/src/events/broker_hooks/centralized_multi_machine.rs

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ use std::{
99
#[cfg(feature = "llmp_compression")]
1010
use libafl_bolts::llmp::LLMP_FLAG_COMPRESSED;
1111
use libafl_bolts::{
12-
llmp::{Flags, LlmpBrokerInner, LlmpHook, LlmpMsgHookResult, Tag},
12+
llmp::{Flags, LlmpBrokerInner, LlmpHook, LlmpMsgHookResult, Tag, LLMP_FLAG_FROM_MM},
1313
ownedref::OwnedRef,
1414
shmem::ShMemProvider,
1515
ClientId, Error,
@@ -255,20 +255,22 @@ where
255255
let msg = msg.into_owned().unwrap().into_vec();
256256
#[cfg(feature = "llmp_compression")]
257257
match state_wr_lock.compressor().maybe_compress(msg.as_ref()) {
258-
Some(comp_buf) => {
259-
Ok((_LLMP_TAG_TO_MAIN, LLMP_FLAG_COMPRESSED, comp_buf))
260-
}
261-
None => Ok((_LLMP_TAG_TO_MAIN, Flags(0), msg)),
258+
Some(comp_buf) => Ok((
259+
_LLMP_TAG_TO_MAIN,
260+
LLMP_FLAG_COMPRESSED | LLMP_FLAG_FROM_MM,
261+
comp_buf,
262+
)),
263+
None => Ok((_LLMP_TAG_TO_MAIN, LLMP_FLAG_FROM_MM, msg)),
262264
}
263265
#[cfg(not(feature = "llmp_compression"))]
264-
Ok((_LLMP_TAG_TO_MAIN, Flags(0), msg))
266+
Ok((_LLMP_TAG_TO_MAIN, LLMP_FLAG_FROM_MM, msg))
265267
}
266268
MultiMachineMsg::Event(evt) => {
267269
let evt = evt.into_owned().unwrap();
268270
let (inner_flags, buf) =
269271
Self::try_compress(&mut state_wr_lock, evt.as_ref())?;
270272

271-
Ok((_LLMP_TAG_TO_MAIN, inner_flags, buf))
273+
Ok((_LLMP_TAG_TO_MAIN, inner_flags | LLMP_FLAG_FROM_MM, buf))
272274
}
273275
})
274276
.collect();

0 commit comments

Comments
 (0)