From: Daniel Seither <post@tiwoc.de>
To: The list for a Better Approach To Mobile Ad-hoc Networking
<b.a.t.m.a.n@lists.open-mesh.org>
Subject: Re: [B.A.T.M.A.N.] [PATCH] batman-adv: Record route for ICMP messages
Date: Mon, 15 Feb 2010 16:36:59 +0100 [thread overview]
Message-ID: <4B796A1B.1090307@tiwoc.de> (raw)
In-Reply-To: <201002142236.43721.lindner_marek@yahoo.de>
I just sent an improved patch.
Marek Lindner schrieb:
>> + /* add record route information if not full */
>> + if (icmp_packet->rr_cur && icmp_packet->rr_cur < BAT_RR_LEN / ETH_ALEN) {
>> + memcpy(&(icmp_packet->rr[icmp_packet->rr_cur * ETH_ALEN]),
>> ethhdr->h_dest, ETH_ALEN);
>> + icmp_packet->rr_cur++;
>> + }
>
> It would be better to check for the actual packet size rather than the
> BAT_RR_LEN define. Some node might have sent us an icmp packet which had a
> different size and then we crash here (or worse).
This should not be the case because, preliminary to adding RR info, it
is checked whether the received frame is long enough for the given
packet_type (at least in the current version of the patch).
Regards, Daniel
prev parent reply other threads:[~2010-02-15 15:36 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-02-12 18:35 [B.A.T.M.A.N.] [PATCH] batman-adv: Record route for ICMP messages Daniel Seither
2010-02-14 14:36 ` Marek Lindner
2010-02-15 9:50 ` Daniel Seither
2010-02-15 15:36 ` Daniel Seither [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=4B796A1B.1090307@tiwoc.de \
--to=post@tiwoc.de \
--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;
as well as URLs for NNTP newsgroup(s).