From patchwork Thu Jul 31 20:53:53 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: David Lamparter X-Patchwork-Id: 375434 X-Patchwork-Delegate: davem@davemloft.net Return-Path: X-Original-To: patchwork-incoming@ozlabs.org Delivered-To: patchwork-incoming@ozlabs.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by ozlabs.org (Postfix) with ESMTP id E10561400AA for ; Fri, 1 Aug 2014 06:54:34 +1000 (EST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753559AbaGaUyc (ORCPT ); Thu, 31 Jul 2014 16:54:32 -0400 Received: from spaceboyz.net ([87.106.131.203]:54567 "EHLO spaceboyz.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751912AbaGaUya (ORCPT ); Thu, 31 Jul 2014 16:54:30 -0400 Received: from [2001:6f8:1c1b:1a18:280:41ff:feb8:e68f] (helo=aegaeon.n2.diac24.net) by spaceboyz.net with esmtpsa (UNKNOWN:DHE-RSA-AES256-GCM-SHA384:256) (Exim 4.80.1) (envelope-from ) id 1XCxMq-0005Ci-4k; Thu, 31 Jul 2014 22:54:28 +0200 Received: from equinox by aegaeon.n2.diac24.net with local (Exim 4.83_RC3) (envelope-from ) id 1XCxMe-000af6-Ub; Thu, 31 Jul 2014 22:54:16 +0200 From: David Lamparter To: netdev@vger.kernel.org Cc: David Miller , David Lamparter , Hannes Frederic Sowa , Stephen Hemminger , Nicolas Dichtel Subject: [PATCH 1/2] ipv6: addrconf: fix mcast route for GRE devices Date: Thu, 31 Jul 2014 22:53:53 +0200 Message-Id: <1406840034-140848-2-git-send-email-equinox@diac24.net> X-Mailer: git-send-email 1.8.5.5 In-Reply-To: <1406840034-140848-1-git-send-email-equinox@diac24.net> References: <20140731201926.GA754314@jupiter.n2.diac24.net> <1406840034-140848-1-git-send-email-equinox@diac24.net> Sender: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org GRE devices, for some reason, were coming up with an autoconfigured address, but no ff00::/8 route in the local table. This breaks any kind of multicast, in particular OSPFv3, mDNS, - and ND. In fact, IPv6 only works at all because there is little need for ND on PtP devices. Adding any other IPv6 address on the device from userspace would rectify this issue through inet6_addr_add()/addrconf_add_dev() - and would leave the route around even if the address was later removed. (This is probably why this issue was not discovered earlier. AFAICS it has been there from the beginning, e.g. aee80b5 "generate link local address for GRE tunnel") (Note: multicast is supported on GRE devices of all kinds, including PtP GRE, P-t-Mcast GRE and NBMA-GRE.) Fixes: aee80b54b235 (ipv6: generate link local address for GRE tunnel) Signed-off-by: David Lamparter Cc: Hannes Frederic Sowa Cc: Stephen Hemminger Cc: Nicolas Dichtel Acked-by: Hannes Frederic Sowa --- net/ipv6/addrconf.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/net/ipv6/addrconf.c b/net/ipv6/addrconf.c index 0b239fc..7540a25 100644 --- a/net/ipv6/addrconf.c +++ b/net/ipv6/addrconf.c @@ -2818,10 +2818,9 @@ static void addrconf_gre_config(struct net_device *dev) ASSERT_RTNL(); - if ((idev = ipv6_find_idev(dev)) == NULL) { - pr_debug("%s: add_dev failed\n", __func__); + idev = addrconf_add_dev(dev); + if (IS_ERR(idev)) return; - } addrconf_addr_gen(idev, true); }