From owner-p4-projects@FreeBSD.ORG Thu Feb 11 18:01:51 2010 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 26D021065698; Thu, 11 Feb 2010 18:01:51 +0000 (UTC) Delivered-To: perforce@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id DF8891065696 for ; Thu, 11 Feb 2010 18:01:50 +0000 (UTC) (envelope-from anchie@FreeBSD.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id CCF208FC16 for ; Thu, 11 Feb 2010 18:01:50 +0000 (UTC) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.3/8.14.3) with ESMTP id o1BI1o29048049 for ; Thu, 11 Feb 2010 18:01:50 GMT (envelope-from anchie@FreeBSD.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.3/8.14.3/Submit) id o1BI1oHa048047 for perforce@freebsd.org; Thu, 11 Feb 2010 18:01:50 GMT (envelope-from anchie@FreeBSD.org) Date: Thu, 11 Feb 2010 18:01:50 GMT Message-Id: <201002111801.o1BI1oHa048047@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to anchie@FreeBSD.org using -f From: Ana Kukec To: Perforce Change Reviews Precedence: bulk Cc: Subject: PERFORCE change 174594 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 11 Feb 2010 18:01:51 -0000 http://p4web.freebsd.org/chv.cgi?CH=174594 Change 174594 by anchie@anchie_malimis on 2010/02/11 18:01:39 Two small, but important bugfixes: => Outgoing packets that were not m_tagged with ND_PACKET_OUTGOING tag were generating EOPNOTSUPP before the packet managed to reach the if_output() because of the return EOPNOTSUPP was placed on the wrong place. => Incoming packets, other then ND/SeND packets, in icmp6_input() did not reach icmp6_rip6_input() because of wrong if condition. Affected files ... .. //depot/projects/soc2009/anchie_send/src/sys/netinet6/icmp6.c#29 edit .. //depot/projects/soc2009/anchie_send/src/sys/netinet6/nd6.c#21 edit .. //depot/projects/soc2009/anchie_send/src/sys/netinet6/send.c#32 edit Differences ... ==== //depot/projects/soc2009/anchie_send/src/sys/netinet6/icmp6.c#29 (text+ko) ==== @@ -941,8 +941,7 @@ } /* deliver the packet to appropriate sockets */ - if (send_input_hook == NULL) - icmp6_rip6_input(&m, *offp); + icmp6_rip6_input(&m, *offp); return IPPROTO_DONE; ==== //depot/projects/soc2009/anchie_send/src/sys/netinet6/nd6.c#21 (text+ko) ==== @@ -1903,10 +1903,8 @@ skip = 1; nd_type = (unsigned short *)(mtag + 1); send_input_hook(m, ifp, SND_OUT, ip6len); - } else - error = EOPNOTSUPP; - - return error; + return error; + } } /* ==== //depot/projects/soc2009/anchie_send/src/sys/netinet6/send.c#32 (text+ko) ==== @@ -55,7 +55,6 @@ struct sockaddr_in6 dst; struct icmp6_hdr *icmp6; int icmp6len; - int offp; /* * Receive incoming (SEND-protected) or outgoing traffic @@ -113,9 +112,6 @@ return (ENOSYS); } - offp = sizeof (struct ip6_hdr); - icmp6_rip6_input(&m, offp); - /* * No error returned from nd6_??_input() so the only thing * we can do is to pretend that it worked.