[Olsr-users] Received message to big to be forwarded

Henning Rogge (spam-protected)
Fri Apr 17 19:26:46 CEST 2015


Hi,

you should deploy this patch on ALL nodes... it should work against
the current "master branch"... but also against your source.

Henning

On Fri, Apr 17, 2015 at 7:25 PM, Jernej Kos <(spam-protected)> wrote:
> Hello!
>
> So if I understand this code correctly, this will limit the maximum
> message size that an originator node will produce? So I should apply
> this patch at the nodes with high neighbour count?
>
> Against which revision is this? I will test the patch over the weekend
> and report back.
>
>
> Jernej
>
> On 17. 04. 2015 16:41, Henning Rogge wrote:
>> Jernej,
>>
>> can you test the following patch?
>>
>> diff --git a/src/net_olsr.c b/src/net_olsr.c
>> index afd24ec..4db54b1 100644
>> --- a/src/net_olsr.c
>> +++ b/src/net_olsr.c
>> @@ -258,7 +258,14 @@ net_outbuffer_push_reserved(struct interface_olsr
>> *ifp, const void *data, const
>>  int
>>  net_outbuffer_bytes_left(const struct interface_olsr *ifp)
>>  {
>> -  return ifp->netbuf.maxsize - ifp->netbuf.pending;
>> +  /* IPv6 minimum MTU - IPv6 header - UDP header - VLAN-Tag */
>> +  static int MAX_REMAINING = 1280 - 40 - 8 - 4;
>> +  int remaining = ifp->netbuf.maxsize - ifp->netbuf.pending;
>> +
>> +  if (remaining > MAX_REMAINING) {
>> +    return MAX_REMAINING;
>> +  }
>> +  return remaining;
>>  }
>>
>>
>>
>> Henning
>




More information about the Olsr-users mailing list