linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Janos Farkas <chexum+dev@gmail.com>
To: David Daney <ddaney@avtrex.com>
Cc: netdev@vger.kernel.org, linux-kernel@vger.kernel.org,
	pgf@foxharp.boston.ma.us, freek@macfreek.nl
Subject: Re: Broadcast ARP packets on link local addresses (Version2).
Date: Thu, 6 Apr 2006 12:24:31 +0200	[thread overview]
Message-ID: <priv$efbe06144502$2d51735f79@200604.gmail.com> (raw)
In-Reply-To: <17460.13568.175877.44476@dl2.hq2.avtrex.com>

On 2006-04-05 at 14:22:08, David Daney wrote:
> The changes in this version are that it tests the source IP address
> instead of the destination.  The test now matches the test described
> in the RFC.  Also a small cleanup as suggested by Herbert Xu.
>
> Some comments on the first version of the patch suggested that I do
> 'X' instead.  Where 'X' was behavior different than that REQUIRED by
> the RFC (the RFC's always seem to capitalize the word 'required').
>
> The reason that I implemented the behavior required by the RFC is so
> that a device running the kernel can pass compliance tests that
> mandate RFC compliance.

Sorry for chiming in this late in the discussion, but...  Shouldn't it
be more correct to not depend on the ip address of the used network,
but to use the "scope" parameter of the given address?

Example

# ip ad sh
...
N: eth0: <BROADCAST,MULTICAST,UP,10000> mtu 1500 qdisc pfifo_fast qlen 1000
    link/ether ...
    inet 169.254.3.3/16 brd 169.254.255.255 scope link eth0
    inet ... scope global eth0

The only drawback is that the scope is usually set manually, and maybe
some tools don't handle it right now, since it's available since just a
few years :)  Scopes, when set right, also may do some appropriate
magic, as I understand, like selecting the correct the source address,
and not allowing link-local addresses to reach out to other scopes.
(Which is also mentioned in the RFC, but this strictness prevent
transparent NAT of clients to the internet.)

I did not look however, whether the scope is available on the place the
patch is modifying currently.  Does the idea look sane to anyone else?

> +        /* If link local address (169.254.0.0/16) we must broadcast
> +         * the ARP packet.  See RFC 3927 section 2.5 for details. */
> +     if ((src_ip & htonl(0xFFFF0000UL)) == htonl(0xA9FE0000UL))
> +             dest_hw = NULL;

Janos

  reply	other threads:[~2006-04-06 10:24 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-04-05 21:22 [PATCH] net: Broadcast ARP packets on link local addresses (Version2) David Daney
2006-04-06 10:24 ` Janos Farkas [this message]
2006-04-06 16:17   ` David Daney
2006-04-06 16:53     ` Janos Farkas
2006-04-07 13:30     ` jamal
2006-04-07 16:18       ` David Daney
2006-04-07 20:38         ` Mark Butler
2006-04-22 17:14 ` [PATCH] net: " Anand Kumria

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='priv$efbe06144502$2d51735f79@200604.gmail.com' \
    --to=chexum+dev@gmail.com \
    --cc=ddaney@avtrex.com \
    --cc=freek@macfreek.nl \
    --cc=linux-kernel@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=pgf@foxharp.boston.ma.us \
    /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).