From nobody@FreeBSD.org  Mon Jan  7 19:17:06 2008
Return-Path: <nobody@FreeBSD.org>
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 46A7416A417
	for <freebsd-gnats-submit@FreeBSD.org>; Mon,  7 Jan 2008 19:17:06 +0000 (UTC)
	(envelope-from nobody@FreeBSD.org)
Received: from www.freebsd.org (www.freebsd.org [IPv6:2001:4f8:fff6::21])
	by mx1.freebsd.org (Postfix) with ESMTP id 2AAC113C45B
	for <freebsd-gnats-submit@FreeBSD.org>; Mon,  7 Jan 2008 19:17:06 +0000 (UTC)
	(envelope-from nobody@FreeBSD.org)
Received: from www.freebsd.org (localhost [127.0.0.1])
	by www.freebsd.org (8.14.2/8.14.2) with ESMTP id m07JG0vm058500
	for <freebsd-gnats-submit@FreeBSD.org>; Mon, 7 Jan 2008 19:16:00 GMT
	(envelope-from nobody@www.freebsd.org)
Received: (from nobody@localhost)
	by www.freebsd.org (8.14.2/8.14.1/Submit) id m07JG01Z058499;
	Mon, 7 Jan 2008 19:16:00 GMT
	(envelope-from nobody)
Message-Id: <200801071916.m07JG01Z058499@www.freebsd.org>
Date: Mon, 7 Jan 2008 19:16:00 GMT
From: Axel Scheepers <axel@axel.truedestiny.net>
To: freebsd-gnats-submit@FreeBSD.org
Subject: route add -host <host> -iface <nic> causes arp entry with nic's arp address
X-Send-Pr-Version: www-3.1
X-GNATS-Notify:

>Number:         119432
>Category:       kern
>Synopsis:       [arp] route add -host <host> -iface <nic> causes arp entry with nic's arp address [regression]
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-net
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Mon Jan 07 19:20:03 UTC 2008
>Closed-Date:    
>Last-Modified:  Mon Jan 12 19:10:01 UTC 2009
>Originator:     Axel Scheepers
>Release:        7.0-PRERELEASE
>Organization:
Private Home User
>Environment:
System: FreeBSD taliesin.thuis.net 7.0-PRERELEASE FreeBSD 7.0-PRERELEASE #1: Sun Jan 6 14:44:59 CET 2008 root@taliesin.thuis.net:/usr/obj/usr/src/sys/TALIESIN i386
>Description:
I use a xs4all connection at home for which I have to use sip spoofing 
(http://www.sterenborg.org:81/docs/alcatel_sip_spoof.html). To make it usefull
I have to set a route to my speedtouch modem with the -iface option to route
like this:
- ifconfig <extNic> <extIp> netmask 255.255.255.255
- route add <modemIp> -iface <extNic>
- route add default <modemIp>

This worked on 4.x as above, on 7.0-PRERELEASE however an arp entry for modemIp
containing the mac adress of extNic is added as soon as I add the route with 
-iface. Pinging the modem causes icmp redirects and ttl expires. I get messages
on the console that modemIp wan't to overwrite the existing arp entry.
I have to enter the correct mac address in the arp table for things to work 
correctly like;
- arp -s <modemIp> <modemMac>
- route add default <modemIp>

I'm not sure if this is intended behaviour but the former way seems more 
intuitive.

>How-To-Repeat:
Connect 2 boxes with crosscable, on box a: (simulates my modem)
- ifconfig fxp0 192.168.0.1 netmask 255.255.255.0
on box b: (simulates my router)
- ifconfig fxp0 10.10.10.1 netmask 255.255.255.255
- route add 192.168.0.1 -iface fxp0
- ping 192.168.0.1
- arp -na
(- arp -s 192.168.0.1 <mac of box a>)
(- ping 192.168.0.1)

>Fix:
You can work around it by setting the correct mac adress in the arp table.


>Release-Note:
>Audit-Trail:
Responsible-Changed-From-To: freebsd-bugs->freebsd-net 
Responsible-Changed-By: linimon 
Responsible-Changed-When: Mon Jan 7 20:13:12 UTC 2008 
Responsible-Changed-Why:  
Over to maintainer(s). 

http://www.freebsd.org/cgi/query-pr.cgi?pr=119432 

From: Axel Scheepers <axel@axel.truedestiny.net>
To: bug-followup@FreeBSD.org, axel@axel.truedestiny.net
Cc:  
Subject: Re: kern/119432: [arp] route add -host &lt;host&gt; -iface
 &lt;nic&gt; causes arp entry with nic's arp address [regression]
Date: Tue, 23 Dec 2008 17:01:52 +0100

 --=-DJi/6GyJxBE0ge5Iv6Kh
 Content-Type: text/plain
 Content-Transfer-Encoding: quoted-printable
 
 Hi,
 
 I had to replace the box in question with a real router due to hardware
 failure. I think using route add -net host -netmask 255.255.255.255
 -interface ip-address-on-egress-interface will actually work but I'm
 still pretty sure -iface used to work on 4.x.
 
 I also found a PR which might be related, 121437.
 'Routing to layer-2 address does not work on VLAN interface'
 
 I'll try to install freebsd on a spare machine to see if using -net
 -netmask -interface actually does work.
 
 Kind regards,
 
 Axel Scheepers
 --=20
 ()  ascii ribbon campaign - against html e-mail=20
 /\  www.asciiribbon.org   - against proprietary attachments
 
 --=-DJi/6GyJxBE0ge5Iv6Kh
 Content-Type: application/pgp-signature; name="signature.asc"
 Content-Description: This is a digitally signed message part
 
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1.4.9 (GNU/Linux)
 
 iEYEABECAAYFAklRC2sACgkQvOFCXiGjP+AHwQCfXlQhJHzK5jTU8FoOzswPc3W/
 FwsAniQwvhcivlEn532JqqfPXiI0L90N
 =G7cf
 -----END PGP SIGNATURE-----
 
 --=-DJi/6GyJxBE0ge5Iv6Kh--
 

From: Axel Scheepers <axel.scheepers@nl.clara.net>
To: bug-followup@FreeBSD.org, axel@axel.truedestiny.net
Cc:  
Subject: Re: kern/119432: [arp] route add -host &lt;host&gt; -iface
 &lt;nic&gt; causes arp entry with nic's arp address [regression]
Date: Mon, 12 Jan 2009 19:47:23 +0100

 Hi again,
 
 Back on FreeBSD(7.1-RELEASE-p1) for my home router ;)
 I can confirm using -net -netmask 255.255.255.255 -interface
 <ip-of-extInt> -cloning works ok;
 
 /etc/rc.conf:
 ifconfig_fxp0="inet x.x.x.x netmask 255.255.255.255 link0 polling"
 static_routes="sipspoof default"
 route_sipspoof="-net 192.168.0.1 -netmask 255.255.255.255 -interface
 x.x.x.x -cloning"
 route_default="default 192.168.0.1"
 
 taliesin# ping -c 2 69.147.83.33
 PING 69.147.83.33 (69.147.83.33): 56 data bytes
 64 bytes from 69.147.83.33: icmp_seq=0 ttl=48 time=173.483 ms
 64 bytes from 69.147.83.33: icmp_seq=1 ttl=48 time=209.926 ms
 
 --- 69.147.83.33 ping statistics ---
 2 packets transmitted, 2 packets received, 0.0% packet loss
 round-trip min/avg/max/stddev = 173.483/191.704/209.926/18.222 ms
 
 Setting defaultrouter will not work since that gets set before the
 static routes are setup hence the need for the default static route.
 
 Kind regards,
 
 Axel Scheepers
 
>Unformatted:
