netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Karlis Peisenieks <karlis@mt.lv>
To: kuznet@ms2.inr.ac.ru
Cc: netdev@oss.sgi.com
Subject: Re: IFF_NOARP & broadcasting [2]
Date: Thu, 25 Jul 2002 16:32:23 +0300	[thread overview]
Message-ID: <20020725163223.A13299@karlis> (raw)
In-Reply-To: <200207241652.UAA19057@sex.inr.ac.ru>; from kuznet@ms2.inr.ac.ru on Wed, Jul 24, 2002 at 19:52:55 +0300

On 2002.07.24 19:52 kuznet@ms2.inr.ac.ru wrote:

> No, it is surely not impossible. f.e.
> 
> ip neigh add 255.255.255.255 dev dummy0 lladdr ff:ff:ff:ff:ff:ff

Ok, but even in this case there is minor problem. And it lies in
net/ethernet/eth.c - eth_header.

neigh_resolve_output creates header cache with correct ll source and ll
destination as in neighbour, but uses dev->hard_header to build header for
first packet. And eth_header has code:

        if (dev->flags & (IFF_LOOPBACK|IFF_NOARP)) 
        {
                memset(eth->h_dest, 0, dev->addr_len);
                return(dev->hard_header_len);
        }

which explicitly sets ll destination to all 0s. For all next packets
hh_cache is used and they get correct ll address (as in neighbour).

Please comment on this patch :) :

--- eth.c.orig	Thu Jul 25 16:16:37 2002
+++ eth.c	Thu Jul 25 16:16:47 2002
@@ -100,7 +100,7 @@
 	 *	Anyway, the loopback-device should never use this
function... 
 	 */
 
-	if (dev->flags & (IFF_LOOPBACK|IFF_NOARP)) 
+	if (dev->flags & IFF_LOOPBACK) 
 	{
 		memset(eth->h_dest, 0, dev->addr_len);
 		return(dev->hard_header_len);



Karlis

  parent reply	other threads:[~2002-07-25 13:32 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-07-24 16:04 IFF_NOARP & broadcasting Karlis Peisenieks
2002-07-24 16:52 ` kuznet
2002-07-24 18:06   ` Karlis Peisenieks
2002-07-25 13:32   ` Karlis Peisenieks [this message]
2002-07-25 14:02     ` IFF_NOARP & broadcasting [2] kuznet
2002-07-25 14:53       ` Karlis Peisenieks

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=20020725163223.A13299@karlis \
    --to=karlis@mt.lv \
    --cc=kuznet@ms2.inr.ac.ru \
    --cc=netdev@oss.sgi.com \
    /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).