From owner-svn-src-head@FreeBSD.ORG Fri Jul 8 11:51:04 2011 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id D0E141065673; Fri, 8 Jul 2011 11:51:04 +0000 (UTC) (envelope-from zec@freebsd.org) Received: from munja.zvne.fer.hr (munja.zvne.fer.hr [161.53.66.248]) by mx1.freebsd.org (Postfix) with ESMTP id 6459D8FC19; Fri, 8 Jul 2011 11:51:04 +0000 (UTC) Received: from sluga.fer.hr ([161.53.66.244]) by munja.zvne.fer.hr with Microsoft SMTPSVC(6.0.3790.4675); Fri, 8 Jul 2011 13:38:58 +0200 Received: from localhost ([161.53.19.8]) by sluga.fer.hr with Microsoft SMTPSVC(6.0.3790.4675); Fri, 8 Jul 2011 13:38:57 +0200 From: Marko Zec To: Andre Oppermann Date: Fri, 8 Jul 2011 13:38:52 +0200 User-Agent: KMail/1.9.10 References: <201107080938.p689cXTe002136@svn.freebsd.org> <4E16D731.9060008@freebsd.org> In-Reply-To: <4E16D731.9060008@freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <201107081338.52323.zec@freebsd.org> X-OriginalArrivalTime: 08 Jul 2011 11:38:57.0804 (UTC) FILETIME=[9FBECCC0:01CC3D63] Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r223862 - in head/sys: net netinet netinet6 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 08 Jul 2011 11:51:05 -0000 On Friday 08 July 2011 12:08:49 Andre Oppermann wrote: > On 08.07.2011 11:38, Marko Zec wrote: > > Author: zec > > Date: Fri Jul 8 09:38:33 2011 > > New Revision: 223862 > > URL: http://svn.freebsd.org/changeset/base/223862 > > > > Log: > > Permit ARP to proceed for IPv4 host routes for which the gateway is > > the same as the host address. This already works fine for INET6 and ND6. > > Can you give an example what this does? Is it some sort of proxy ARP? It is a bugfix. Consider this example on a pre-223862 kernel: cp12# ifconfig re0 10.0.0.2/24 cp12# ping -c 1 10.0.0.1 PING 10.0.0.1 (10.0.0.1): 56 data bytes 64 bytes from 10.0.0.1: icmp_seq=0 ttl=64 time=0.335 ms --- 10.0.0.1 ping statistics --- 1 packets transmitted, 1 packets received, 0.0% packet loss round-trip min/avg/max/stddev = 0.285/0.285/0.285/0.000 ms So far, so good, but: cp12# arp -da 10.0.0.2 (10.0.0.2) deleted 10.0.0.1 (10.0.0.1) deleted cp12# route add 10.0.0.1 10.0.0.1 add host 10.0.0.1: gateway 10.0.0.1 cp12# netstat -rnf inet Destination Gateway Flags Refs Use Netif Expire 10.0.0.0/24 link#1 U 0 1 re0 10.0.0.1 10.0.0.1 UGHS 0 0 re0 10.0.0.2 link#1 UHS 0 0 lo0 127.0.0.1 link#11 UH 0 5 lo0 cp12# ping 10.0.0.1 PING 10.0.0.1 (10.0.0.1): 56 data bytes ping: sendto: Invalid argument ping: sendto: Invalid argument ^C --- 10.0.0.1 ping statistics --- 2 packets transmitted, 0 packets received, 100.0% packet loss cp12# dmesg | tail -2 arpresolve: can't allocate llinfo for 10.0.0.1 arpresolve: can't allocate llinfo for 10.0.0.1 With 223862 this scenario is no longer a problem: cp12# ifconfig re0 10.0.0.2/24 cp12# route add 10.0.0.1 10.0.0.1 add host 10.0.0.1: gateway 10.0.0.1 cp12# netstat -rnf inet Destination Gateway Flags Refs Use Netif Expire 10.0.0.0/24 link#1 U 0 0 re0 10.0.0.1 10.0.0.1 UGHS 0 0 re0 10.0.0.2 link#1 UHS 0 0 lo0 127.0.0.1 link#11 UH 0 4 lo0 cp12# ping 10.0.0.1 PING 10.0.0.1 (10.0.0.1): 56 data bytes 64 bytes from 10.0.0.1: icmp_seq=0 ttl=64 time=0.578 ms <-- ARP pingpong here 64 bytes from 10.0.0.1: icmp_seq=1 ttl=64 time=0.134 ms ^C --- 10.0.0.1 ping statistics --- 2 packets transmitted, 2 packets received, 0.0% packet loss round-trip min/avg/max/stddev = 0.134/0.356/0.578/0.222 ms > > While here, remove two function pointers from struct lltable which are > > only initialized but never used. > > Ideally this would have been a separate commit because it has nothing to > do with primary functional change. You're right, sorry for the noise... Marko