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

Henning Rogge (spam-protected)
Fri Apr 17 16:41:57 CEST 2015


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

On Fri, Apr 17, 2015 at 4:32 PM, Henning Rogge <(spam-protected)> wrote:
> Sure,
>
> but that is not really a good idea for UDP Multicast... especially in
> networks with some amount of multicast packet loss.
>
> Henning
>
> On Fri, Apr 17, 2015 at 4:31 PM, Teco Boot <(spam-protected)> wrote:
>> Clearing the DF bit enables IP stack fragmenting.
>>
>> Teco
>>
>>> Op 17 apr. 2015, om 16:08 heeft Henning Rogge <(spam-protected)> het volgende geschreven:
>>>
>>> That is what I mentioned earlier... limiting the maximum size of a
>>> message independent of the packet/MTU size.
>>>
>>> Henning
>>>
>>> On Fri, Apr 17, 2015 at 4:07 PM, Ferry Huberts <(spam-protected)> wrote:
>>>>
>>>>
>>>> On 17/04/15 16:04, Henning Rogge wrote:
>>>>>
>>>>> Yes,
>>>>>
>>>>> but the fix does not handle mesh networks with different MTUs.
>>>>>
>>>>> the 160 neighbor nodes produces a TC as large as it can... according
>>>>> to the local MTU. when this message is forwarded (within UDP and olsr
>>>>> packets) it reaches a node with a link where the MTU is small enough
>>>>> that the message does not fit through.
>>>>>
>>>>
>>>> Which is what I meant earlier: olsrd should split the packet.
>>>>
>>>>
>>>>
>>>>> Henning
>>>>>
>>>>> On Fri, Apr 17, 2015 at 3:16 PM, Ferry Huberts <(spam-protected)> wrote:
>>>>>>
>>>>>>
>>>>>>
>>>>>> On 17/04/15 15:11, Jernej Kos wrote:
>>>>>>>
>>>>>>>
>>>>>>> Hello!
>>>>>>>
>>>>>>> On 17. 04. 2015 15:08, Ferry Huberts wrote:
>>>>>>>>
>>>>>>>>
>>>>>>>> Which version of olsrd are you running?
>>>>>>>> The 160+ number is suspiciously like a problem that Henning fixed a
>>>>>>>> while ago.
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>> We are running olsrd version 0.6.7.1.
>>>>>>
>>>>>>
>>>>>>
>>>>>> That includes Henning's fix.
>>>>
>>>>
>>>> --
>>>> Ferry Huberts
>>>
>>> --
>>> Olsr-users mailing list
>>> (spam-protected)
>>> https://lists.olsr.org/mailman/listinfo/olsr-users
>>




More information about the Olsr-users mailing list