From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751554Ab3KKUkC (ORCPT ); Mon, 11 Nov 2013 15:40:02 -0500 Received: from order.stressinduktion.org ([87.106.68.36]:36201 "EHLO order.stressinduktion.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751708Ab3KKUj4 (ORCPT ); Mon, 11 Nov 2013 15:39:56 -0500 Date: Mon, 11 Nov 2013 21:39:54 +0100 From: Hannes Frederic Sowa To: Kamala R Cc: davem@davemloft.net, linux-kernel@vger.kernel.org, netdev@vger.kernel.org Subject: Re: IPv6: Blackhole route support partial ? Message-ID: <20131111203954.GB3043@order.stressinduktion.org> Mail-Followup-To: Kamala R , davem@davemloft.net, linux-kernel@vger.kernel.org, netdev@vger.kernel.org References: Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hello! On Mon, Nov 11, 2013 at 07:25:14PM +0530, Kamala R wrote: > On adding IPv6 blackhole routes, ICMP unreachable messages are being > sent back to source. According to the definition, packets destined to > a blackhole address must be dropped silently. Yes, this is a bug. > I applied the patch submitted to the 3.7 kernel that indicates that it > supports blackhole and prohibit routes correctly. However, the patch > only sets the error code and route type correctly, so the show command > displays the appropriate output. > > > It seems to me that the input and output function pointers of the dst > variable, which determine packet processing, need to be set to > dst_discard. This would enable correct behaviour for blackhole routes. > Am I on the right path here ? I think you are. ip6_pkt_discard is not the correct input/output function for blackhole routes. In ip6_route_add simply set up the function pointers in the switch instead to just initializing them to ip6_pkt_discard. dst_discard is fine. Looks like prohibit rules are not handled correctly either. They should go to ip6_pkt_prohibit. (Just look at how the templates are initialized.) Could you cook a patch? Thanks, Hannes