netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: akepner@sgi.com
To: netdev@vger.kernel.org
Cc: arenaud@sgi.com
Subject: [PATCH] don't put multicasts with mc_ttl=0 on the wire
Date: Tue, 15 May 2007 12:56:02 -0700	[thread overview]
Message-ID: <20070515195602.GK19036@sgi.com> (raw)



A colleague of mine found that multicasts with a ttl of 0
can be sent on the wire. This happens if the sender doesn't
belong to the destination multicast group.

With the following the multicast ttl is respected whether
or not the sender belongs to the destination multicast group.

Signed-off-by: Arthur Kepner <akepner@sgi.com>

---

 net/ipv4/route.c |    3 +--
 1 files changed, 1 insertions(+), 2 deletions(-)

diff --git a/net/ipv4/route.c b/net/ipv4/route.c
index cb76e3c..bf25cf5 100644
--- a/net/ipv4/route.c
+++ b/net/ipv4/route.c
@@ -2249,8 +2249,7 @@ static inline int __mkroute_output(struct rtable **result,
 	}
 	if (flags & (RTCF_BROADCAST | RTCF_MULTICAST)) {
 		rth->rt_spec_dst = fl->fl4_src;
-		if (flags & RTCF_LOCAL &&
-		    !(dev_out->flags & IFF_LOOPBACK)) {
+		if (!(dev_out->flags & IFF_LOOPBACK)) {
 			rth->u.dst.output = ip_mc_output;
 			RT_CACHE_STAT_INC(out_slow_mc);
 		}

-- 
Arthur


             reply	other threads:[~2007-05-15 19:56 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-05-15 19:56 akepner [this message]
2007-05-15 20:45 ` [PATCH] don't put multicasts with mc_ttl=0 on the wire David Miller
2007-05-15 21:40 ` David Stevens

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=20070515195602.GK19036@sgi.com \
    --to=akepner@sgi.com \
    --cc=arenaud@sgi.com \
    --cc=netdev@vger.kernel.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).