mirror of
https://github.com/servalproject/serval-dna.git
synced 2024-12-19 05:07:56 +00:00
Fix stupid bug, test was backwards
This commit is contained in:
parent
b1f384cd63
commit
d3a13f8d2c
@ -97,7 +97,6 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
||||
#define PAYLOAD_FLAG_ONE_HOP (1<<2)
|
||||
#define PAYLOAD_FLAG_CIPHERED (1<<4)
|
||||
#define PAYLOAD_FLAG_SIGNED (1<<5)
|
||||
#define PAYLOAD_FLAG_DUPLICATE (1<<6)
|
||||
|
||||
/* Time-to-live is a 'uint5_t'.
|
||||
*/
|
||||
|
@ -227,7 +227,7 @@ int parseMdpPacketHeader(struct decode_context *context, struct overlay_frame *f
|
||||
}else
|
||||
frame->type=OF_TYPE_DATA;
|
||||
|
||||
if (context->packet_version >0){
|
||||
if (context->packet_version >= 1){
|
||||
int seq = ob_get(buffer);
|
||||
if (seq == -1)
|
||||
RETURN(WHY("Unable to read packet seq"));
|
||||
|
@ -73,7 +73,7 @@ static int overlay_frame_build_header(int packet_version, struct decode_context
|
||||
if (ob_append_byte(buff, type)) return -1;
|
||||
}
|
||||
|
||||
if (packet_version>0)
|
||||
if (packet_version >= 1)
|
||||
if (ob_append_byte(buff, sequence))
|
||||
return -1;
|
||||
|
||||
|
@ -494,7 +494,7 @@ overlay_stuff_packet(struct outgoing_packet *packet, overlay_txqueue *queue, tim
|
||||
}else{
|
||||
// is this packet going our way?
|
||||
if (frame->interface!=packet->interface ||
|
||||
frame->packet_version==packet->packet_version ||
|
||||
frame->packet_version!=packet->packet_version ||
|
||||
memcmp(&packet->dest, &frame->recvaddr, sizeof(packet->dest))!=0){
|
||||
goto skip;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user