public inbox for b.a.t.m.a.n@lists.open-mesh.org
 help / color / mirror / Atom feed
From: Marek Lindner <mareklindner@neomailbox.ch>
To: b.a.t.m.a.n@lists.open-mesh.org
Subject: Re: [B.A.T.M.A.N.] [PATCHv3] batman-adv: generalize batman-adv icmp packet handling
Date: Wed, 23 Oct 2013 05:01:04 +0800	[thread overview]
Message-ID: <1819951.9mYekNXCEW@diderot> (raw)
In-Reply-To: <1382475009-20517-1-git-send-email-sw@simonwunderlich.de>

[-- Attachment #1: Type: text/plain, Size: 1573 bytes --]

On Tuesday 22 October 2013 22:50:09 Simon Wunderlich wrote:
> Instead of handling icmp packets only up to length of icmp_packet_rr,
> the code should handle any icmp length size. Therefore the length
> truncating is moved to when the packet is actually sent to userspace
> (this does not support lengths longer than icmp_packet_rr yet). Longer
> packets are forwarded without truncating.
> 
> This patch also cleans up some parts where the icmp header struct could
> be used instead of other icmp_packet(_rr) structs to make the code more
> readable.
> 
> Signed-off-by: Simon Wunderlich <sw@simonwunderlich.de>
> ---
> Changes to PATCHv2 (as per IRC discussion with Marek and Antonio):
>  * use length for icmp_len after truncating in batadv_socket_add_packet
>  * remove the MAX macro and define packet size to icmp_packet_rr for now
> 
> Changes to PATCHv1 (suggested by Marek):
>  * use maximum packet size for batadv_socket_client icmp_packet instead
>    of hardcoded icmp_packet_rr
>  * drop unknown packet types in batadv_recv_my_icmp_packet()
>  * remove usage for icmp_packet_rr in batadv_socket_write where not
>    needed, and check for message type
>  * use right length parameter in batadv_socket_add_packet
> ---
>  icmp_socket.c |  128
> ++++++++++++++++++++++++++++++++++--------------------- icmp_socket.h
> |    2 +-
>  packet.h      |    2 +
>  routing.c     |  131
> ++++++++++++++++++++++++++++++++++-----------------------
> types.h       |    2 +-
>  5 files changed, 163 insertions(+), 102 deletions(-)

Applied in revision bb69cb6.

Thanks,
Marek

[-- Attachment #2: This is a digitally signed message part. --]
[-- Type: application/pgp-signature, Size: 490 bytes --]

      reply	other threads:[~2013-10-22 21:01 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-10-22 20:50 [B.A.T.M.A.N.] [PATCHv3] batman-adv: generalize batman-adv icmp packet handling Simon Wunderlich
2013-10-22 21:01 ` Marek Lindner [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1819951.9mYekNXCEW@diderot \
    --to=mareklindner@neomailbox.ch \
    --cc=b.a.t.m.a.n@lists.open-mesh.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox