mirror of
https://github.com/servalproject/serval-dna.git
synced 2025-01-29 15:43:56 +00:00
fixed test for malformed packets.
This commit is contained in:
parent
ca5eb7d8bb
commit
610f7acdf8
@ -616,10 +616,11 @@ static void interface_read_stream(struct overlay_interface *interface){
|
||||
while (state->src_offset < state->src_size) {
|
||||
int ret = slip_decode(state);
|
||||
if (ret==1){
|
||||
packetOkOverlay(interface, state->dst, state->packet_length, -1, NULL, -1);
|
||||
if (config.debug.rejecteddata) {
|
||||
WHYF("Malformed packet (length = %d)",state->packet_length);
|
||||
dump("the malformed packet",state->dst,state->packet_length);
|
||||
if (packetOkOverlay(interface, state->dst, state->packet_length, -1, NULL, -1)) {
|
||||
if (config.debug.rejecteddata) {
|
||||
WHYF("Malformed packet (length = %d)",state->packet_length);
|
||||
dump("the malformed packet",state->dst,state->packet_length);
|
||||
}
|
||||
}
|
||||
state->dst_offset=0;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user