Fix: MLPPP complete lost frame.

This commit is contained in:
Fernando Alves 2012-02-04 18:18:26 +01:00 committed by Benjamin Cama
parent 442b04cea2
commit 43d9ea52f9

20
ppp.c
View file

@ -1919,18 +1919,22 @@ void processmpin(sessionidt s, tunnelidt t, uint8_t *p, uint16_t l)
else if (M_offset > 0) else if (M_offset > 0)
{ {
uint32_t b_seq = min; uint32_t b_seq = min;
if (min == seq_num) if ((min == seq_num) && begin_frame)
{ {
if (begin_frame) // Set new Start sequence
{ this_fragmentation->start_index = begin_index;
// Set new Start sequence this_fragmentation->start_seq = min;
this_fragmentation->start_index = begin_index; frag_offset = 0;
this_fragmentation->start_seq = min;
frag_offset = 0;
}
} }
else else
{ {
if (min == seq_num)
{
M_offset--;
begin_index = (begin_index ? (begin_index -1) : (MAXFRAGNUM -1));
b_seq--;
}
// Find the Begin sequence // Find the Begin sequence
while (this_fragmentation->fragment[begin_index].length) while (this_fragmentation->fragment[begin_index].length)
{ {