From patchwork Tue Jun 30 22:54:27 2009 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Denys Fedoryshchenko X-Patchwork-Id: 29339 X-Patchwork-Delegate: davem@davemloft.net Return-Path: X-Original-To: patchwork-incoming@bilbo.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from ozlabs.org (ozlabs.org [203.10.76.45]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client CN "mx.ozlabs.org", Issuer "CA Cert Signing Authority" (verified OK)) by bilbo.ozlabs.org (Postfix) with ESMTPS id 3E0CCB70EE for ; Wed, 1 Jul 2009 13:30:05 +1000 (EST) Received: by ozlabs.org (Postfix) id 29992DDD0C; Wed, 1 Jul 2009 13:30:05 +1000 (EST) Delivered-To: patchwork-incoming@ozlabs.org Received: from vger.kernel.org (vger.kernel.org [209.132.176.167]) by ozlabs.org (Postfix) with ESMTP id B3577DDD04 for ; Wed, 1 Jul 2009 13:30:04 +1000 (EST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755902AbZGAD3j (ORCPT ); Tue, 30 Jun 2009 23:29:39 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1754637AbZGAD3j (ORCPT ); Tue, 30 Jun 2009 23:29:39 -0400 Received: from hosting.visp.net.lb ([194.146.153.11]:35955 "EHLO hosting.visp.net.lb" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753980AbZGAD3i (ORCPT ); Tue, 30 Jun 2009 23:29:38 -0400 Received: by hosting.visp.net.lb (Postfix, from userid 65534) id 499671A417D; Wed, 1 Jul 2009 04:04:10 +0300 (EEST) X-Spam-Checker-Version: SpamAssassin 3.2.5 (2008-06-10) on vmail X-Spam-Level: X-Spam-Status: No, score=-1.4 required=5.0 tests=ALL_TRUSTED autolearn=failed version=3.2.5 Received: from adminos.visp.net.lb (unknown [195.69.208.252]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) (Authenticated sender: denys@visp.net.lb) by hosting.visp.net.lb (Postfix) with ESMTPSA id 6FF271A4144; Wed, 1 Jul 2009 04:03:56 +0300 (EEST) From: Denys Fedoryschenko Organization: VISP To: "Eric W. Biederman" Subject: Re: [RFC] arp announce, arp_proxy and windows ip conflict verification Date: Wed, 1 Jul 2009 01:54:27 +0300 User-Agent: KMail/1.9.9 Cc: netdev@vger.kernel.org, David Miller References: <200903011344.45814.denys@visp.net.lb> In-Reply-To: MIME-Version: 1.0 Message-Id: <200907010154.27457.denys@visp.net.lb> Sender: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org On Wednesday 01 July 2009 01:55:59 Eric W. Biederman wrote: > > I have a problem with this patch. It stops gratuitous arps updating > my arp cache. I'm still trying to figure out what the correct behaviour > should be. > > Perhaps making the goto out; become if (sip == 0) goto out; Yes, you are right. Proposing 3 simple patches against git next-next-2.6 . As attaches (sorry, kmail). All of them equal, but since i am amateur in programming, i dont know how it is should be done "nice way". If you want to test it - do it carefully. I didn't did runtime tests yet, but they are compile tested. (But they are trivial). If someone can review and tell if any of them ok, i will submit it with proper tags and etc. diff -uprN net-next-2.6/net/ipv4/arp.c net-next-2.6.my3/net/ipv4/arp.c --- net-next-2.6/net/ipv4/arp.c 2009-07-01 01:00:58.000000000 +0300 +++ net-next-2.6.my3/net/ipv4/arp.c 2009-07-01 01:26:09.000000000 +0300 @@ -815,6 +815,7 @@ static int arp_process(struct sk_buff *s } if (arp->ar_op == htons(ARPOP_REQUEST) && + tip != sip && ip_route_input(skb, tip, sip, 0, dev) == 0) { rt = skb_rtable(skb);