All of lore.kernel.org
 help / color / mirror / Atom feed
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 10:50:36 +0100	[thread overview]
Message-ID: <4B7918EC.40100@tiwoc.de> (raw)
In-Reply-To: <201002142236.43721.lindner_marek@yahoo.de>

Marek Lindner schrieb:
> I don't think it will be necessary to change the packet size dynamically. The 
> gain will be rather small compared to the overhead it creates. However, it 
> would make sense to specify 2 different icmp structs and only send the large 
> packet when RR is really needed. 

Sounds good, I'll prepare a new version of the patch.

>> +	/* 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).

You're right, I'll change this.

Regards, Daniel

  reply	other threads:[~2010-02-15  9:50 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 [this message]
2010-02-15 15:36   ` Daniel Seither

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=4B7918EC.40100@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.