From: Johannes Berg <johannes-cdvu00un1VgdHxzADdlk8Q@public.gmane.org>
To: Stephen Hemminger
<stephen-OTpzqLSitTUnbdJkjeBofR2eb7JE58TQ@public.gmane.org>
Cc: linux-wireless-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
netdev-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
Subject: Re: [RFC] net: ipv4: drop unicast encapsulated in L2 multicast
Date: Wed, 03 Sep 2014 11:40:55 +0200 [thread overview]
Message-ID: <1409737255.1932.5.camel@jlt4.sipsolutions.net> (raw)
In-Reply-To: <20140902141620.2da1f6aa@urahara> (sfid-20140902_231626_427316_AF0944A4)
On Tue, 2014-09-02 at 14:16 -0700, Stephen Hemminger wrote:
> On Thu, 21 Aug 2014 19:22:27 +0200
> Johannes Berg <johannes-cdvu00un1VgdHxzADdlk8Q@public.gmane.org> wrote:
>
> > + /* RFC 1122 3.3.6:
> > + *
> > + * When a host sends a datagram to a link-layer broadcast address,
> > + * the IP destination address MUST be a legal IP broadcast or IP
> > + * multicast address.
> > + *
> > + * A host SHOULD silently discard a datagram that is received via
> > + * a link-layer broadcast (see Section 2.4) but does not specify
> > + * an IP multicast or broadcast destination address.
> > + *
> > + * We also do this for link-layer multicast.
> > + */
> > + if ((skb->pkt_type == PACKET_BROADCAST ||
> > + skb->pkt_type == PACKET_MULTICAST) &&
> > + res.type != RTN_BROADCAST)
> > + goto e_inval;
> > +
>
> I think you need to all multicast packet but not broadcast.
> The RFC does not specify that you should drop link-layer multicast to a unicast
> address. There are several clustering products use that.
Alright - I feared we'd not be able to do this. Based on a strict
reading of the RFC, you're right. I'm not sure what thinking and
rationale went into this sentence in the RFC, depending on that it would
have made sense to me to also apply it for broadcast (which is really
just a special form of multicast, in a sense, no?)
In any case, for wireless we do need broadcast as well, for obvious
reasons. Therefore, I think with all the discussion here and about IPv6
etc. we're getting to the point where we should think about
disentangling RFC 1122 checks (which may very well be correct and needed
in their own right) and the hole-196 mitigation for wireless.
Our original attempt is documented here:
http://patchwork.ozlabs.org/patch/293133/
and there seemed to be consensus back then that we should do it in the
wireless stack. I can live with that, even if I don't very much like the
idea of dissecting IP protocols there and having to do a route lookup
etc. In any case, if that's what we want to do, I'll probably need some
help on how to do the route lookups etc. Any takers? :)
johannes
--
To unsubscribe from this list: send the line "unsubscribe linux-wireless" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
prev parent reply other threads:[~2014-09-03 9:40 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-08-21 17:22 [RFC] net: ipv4: drop unicast encapsulated in L2 multicast Johannes Berg
2014-08-21 17:32 ` Johannes Berg
[not found] ` <1408642331.4388.2.camel-8Nb76shvtaUJvtFkdXX2HixXY32XiHfO@public.gmane.org>
2014-08-27 7:38 ` Hannes Frederic Sowa
2014-08-27 9:05 ` Johannes Berg
2014-08-27 9:53 ` Hannes Frederic Sowa
2014-09-02 9:36 ` Johannes Berg
2014-09-03 1:59 ` YOSHIFUJI Hideaki
[not found] ` <540675F2.1030308-GmhWrQMWH5w7YuNMryXyOw@public.gmane.org>
2014-09-02 22:03 ` David Miller
[not found] ` <20140902.150326.1420682815750767731.davem-fT/PcQaiUtIeIZ0/mPfg9Q@public.gmane.org>
2014-09-03 12:01 ` Hannes Frederic Sowa
2014-08-21 19:51 ` Julian Anastasov
[not found] ` <alpine.LFD.2.11.1408212119510.1896-c1lBKlETG9EWAawoAK+ZAw@public.gmane.org>
2014-08-22 17:54 ` David Miller
2014-08-27 9:13 ` Johannes Berg
[not found] ` <1409130792.2505.5.camel-8Nb76shvtaUJvtFkdXX2HixXY32XiHfO@public.gmane.org>
2014-08-27 10:23 ` Julian Anastasov
[not found] ` <alpine.LFD.2.11.1408271255230.2348-c1lBKlETG9EWAawoAK+ZAw@public.gmane.org>
2014-08-27 11:29 ` Johannes Berg
2014-08-27 14:31 ` Julian Anastasov
2014-09-02 9:33 ` Johannes Berg
[not found] ` <20140822.105405.1982870131653082781.davem-fT/PcQaiUtIeIZ0/mPfg9Q@public.gmane.org>
2014-11-20 21:31 ` Johannes Berg
[not found] ` <1408641747-22199-1-git-send-email-johannes-cdvu00un1VgdHxzADdlk8Q@public.gmane.org>
2014-09-02 21:16 ` Stephen Hemminger
2014-09-03 9:40 ` Johannes Berg [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=1409737255.1932.5.camel@jlt4.sipsolutions.net \
--to=johannes-cdvu00un1vgdhxzaddlk8q@public.gmane.org \
--cc=linux-wireless-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=netdev-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=stephen-OTpzqLSitTUnbdJkjeBofR2eb7JE58TQ@public.gmane.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).