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

Jernej Kos (spam-protected)
Fri Apr 17 19:25:05 CEST 2015


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

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 836 bytes
Desc: OpenPGP digital signature
URL: <http://lists.olsr.org/pipermail/olsr-users/attachments/20150417/abd83553/attachment.sig>


More information about the Olsr-users mailing list