From nobody@FreeBSD.org  Wed Dec 29 20:23:19 2004
Return-Path: <nobody@FreeBSD.org>
Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125])
	by hub.freebsd.org (Postfix) with ESMTP id F218116A4CE
	for <freebsd-gnats-submit@FreeBSD.org>; Wed, 29 Dec 2004 20:23:19 +0000 (GMT)
Received: from www.freebsd.org (www.freebsd.org [216.136.204.117])
	by mx1.FreeBSD.org (Postfix) with ESMTP id D9D5343D46
	for <freebsd-gnats-submit@FreeBSD.org>; Wed, 29 Dec 2004 20:23:19 +0000 (GMT)
	(envelope-from nobody@FreeBSD.org)
Received: from www.freebsd.org (localhost [127.0.0.1])
	by www.freebsd.org (8.13.1/8.13.1) with ESMTP id iBTKNJOK080158
	for <freebsd-gnats-submit@FreeBSD.org>; Wed, 29 Dec 2004 20:23:19 GMT
	(envelope-from nobody@www.freebsd.org)
Received: (from nobody@localhost)
	by www.freebsd.org (8.13.1/8.13.1/Submit) id iBTKNJpd080157;
	Wed, 29 Dec 2004 20:23:19 GMT
	(envelope-from nobody)
Message-Id: <200412292023.iBTKNJpd080157@www.freebsd.org>
Date: Wed, 29 Dec 2004 20:23:19 GMT
From: Alexander Haidukov <sanek@sw.ru>
To: freebsd-gnats-submit@FreeBSD.org
Subject: The proxy arp wrong functionality
X-Send-Pr-Version: www-2.3

>Number:         75634
>Category:       kern
>Synopsis:       The proxy arp wrong functionality
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    glebius
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Wed Dec 29 20:30:30 GMT 2004
>Closed-Date:    Thu Nov 03 12:04:31 GMT 2005
>Last-Modified:  Thu Nov 03 12:04:31 GMT 2005
>Originator:     Alexander Haidukov
>Release:        5.2.1
>Organization:
SWsoft Inc.
>Environment:
FreeBSD router 5.2.1-RELEASE-p12 FreeBSD 5.2.1-RELEASE-p12 #2: Tue Dec 14 21:47:56 MSK 2004     sanek@router:/usr/src/sys/i386/compile/ROUTER  i386

>Description:
      I have /28 real IP. I tryed setup my router with "proxy arp" with arp -s command. Router have two interfaces: one with real IP and second with fake IP. And i have one IP from /28 range on one of my interlal host. This host have a Windows 2000 AS operating system. So, if i setup IP to internal host until make my router with "proxy arp" all is ok - the "proxy arp" work properly. If i setup first "proxy arp" on router and after setup IP on Windows machine i have a address conflict, i.e. my router arp reply to Windows machine (connected to internal iface) and Windows saying that her IP use another host with external iface MAC address of my router. 
>How-To-Repeat:
See documentations, try find how to setup FreeBSD with "proxy arp".
>Fix:
I don't known how fix problem.
>Release-Note:
>Audit-Trail:
State-Changed-From-To: open->feedback 
State-Changed-By: glebius 
State-Changed-When: Tue Jan 18 15:26:16 GMT 2005 
State-Changed-Why:  
Submitter was asked for feedback. 

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

From: Gleb Smirnoff <glebius@freebsd.org>
To: Alexander Haidukov <sanek@sw.ru>
Cc: freebsd-gnats-submit@freebsd.org
Subject: Re: kern/75634: The proxy arp wrong functionality
Date: Tue, 18 Jan 2005 18:26:01 +0300

   Alexander,
 
 On Wed, Dec 29, 2004 at 08:23:19PM +0000, Alexander Haidukov wrote:
 A> >Description:
 A>       I have /28 real IP. I tryed setup my router with "proxy arp" with arp -s command. Router have two interfaces: one with real IP and second with fake IP. And i have one IP from /28 range on one of my interlal host. This host have a Windows 2000 AS operating system. So, if i setup IP to internal host until make my router with "proxy arp" all is ok - the "proxy arp" work properly. If i setup first "proxy arp" on router and after setup IP on Windows machine i have a address conflict, i.e. my router arp  reply to Windows machine (connected to internal iface) and Windows saying that her IP use another host with external iface MAC address of my router. 
 
 Your description is not understandible, sorry. Can you please show an exact
 sequence of commands, which lead to errneous behavior. And pls show error messages,
 too.
 
 -- 
 Totus tuus, Glebius.
 GLEBIUS-RIPN GLEB-RIPE
State-Changed-From-To: feedback->closed 
State-Changed-By: arved 
State-Changed-When: Mon Jun 6 17:01:21 GMT 2005 
State-Changed-Why:  
feedback timeout. 

Most likeley this topic belongs to freebsd-questions. 

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

From: Gleb Smirnoff <glebius@FreeBSD.org>
To: freebsd-gnats-submit@FreeBSD.org
Cc:  
Subject: Re: kern/75634: The proxy arp wrong functionality
Date: Tue, 16 Aug 2005 18:42:22 +0400

  Adding to Audit-Trail:
 
 ----- Forwarded message from Haidukov Alexander <ahaidukov@croc.ru> -----
 
  Excuse for bad English. 
  In shortly:
 
  I have em0 and em1 interfases on my router. 
  em0: xxx.xxx.xxx.2 (The real IP from xxx.xxx.xxx.0/28 IP range)  
  em1: 192.168.0.1 (192.168.0.0/24 my internal net IP range) 
 
 
 Internet<---->[em0<---->em1]<---->[Windows]
                          Router
 
 1. On external interface of my router, i setup "proxy arp" use the
 following commands:
 
  #arp -s xxx.xxx.xxx.3 AAA.AAA.AAA.AAA pub
 
 Where AAA.AAA.AAA.AAA is MAC on external interface of my router.
 
 2. On internal host with run Windows 2000 AS (192.168.0.2) I add the
 additional IP (xxx.xxx.xxx.3) from my real IP range.
  
 In this case, windows host show the error message (like it):
 
 Address conflict. Host with MAC AAA.AAA.AAA.AAA have a my IP. The local
 interface will be disabled.
 
 If I try setup real IP to Windows machine first, and "proxy arp" to my
 router second all work properly.
  
 ----- End forwarded message -----
 
 -- 
 Totus tuus, Glebius.
 GLEBIUS-RIPN GLEB-RIPE
State-Changed-From-To: closed->open 
State-Changed-By: glebius 
State-Changed-When: Tue Aug 16 14:50:24 GMT 2005 
State-Changed-Why:  
Feedback was misfiled. Feedback attached to Audit-Trail. 
Reopen PR. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=75634 
Responsible-Changed-From-To: freebsd-bugs->glebius 
Responsible-Changed-By: glebius 
Responsible-Changed-When: Tue Aug 16 14:51:06 GMT 2005 
Responsible-Changed-Why:  
I can reproduce it. I'm going to work on this. 

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

From: Gleb Smirnoff <glebius@cell.sick.ru>
To: Alexander Haidukov <sanek@sw.ru>
Cc: freebsd-gnats-submit@FreeBSD.org
Subject: Re: kern/75634: The proxy arp wrong functionality
Date: Wed, 17 Aug 2005 15:47:56 +0400

 --eRtJSFbw+EEWtPj3
 Content-Type: text/plain; charset=koi8-r
 Content-Disposition: inline
 
   Alexander,
 
   can you please try the attached patch?
 
 -- 
 Totus tuus, Glebius.
 GLEBIUS-RIPN GLEB-RIPE
 
 --eRtJSFbw+EEWtPj3
 Content-Type: text/plain; charset=koi8-r
 Content-Disposition: attachment; filename="kern.75634.RELENG_5_2.diff"
 
 Index: if_ether.c
 ===================================================================
 RCS file: /home/ncvs/src/sys/netinet/if_ether.c,v
 retrieving revision 1.115
 diff -u -r1.115 if_ether.c
 --- if_ether.c	8 Nov 2003 23:36:31 -0000	1.115
 +++ if_ether.c	17 Aug 2005 11:47:14 -0000
 @@ -828,6 +828,13 @@
  #endif
  		} else {
  			rt = la->la_rt;
 +			/*
 +			 * Return proxied ARP replies only on the interface
 +			 * where this network resides. Otherwise we may
 +			 * conflict with the host we are proxying for.
 +			 */
 +			if (rt->rt_ifp != ifp)
 +				goto drop;
  			(void)memcpy(ar_tha(ah), ar_sha(ah), ah->ar_hln);
  			sdl = SDL(rt->rt_gateway);
  			(void)memcpy(ar_sha(ah), LLADDR(sdl), ah->ar_hln);
 
 --eRtJSFbw+EEWtPj3--
State-Changed-From-To: open->feedback 
State-Changed-By: glebius 
State-Changed-When: Sat Aug 20 09:11:50 GMT 2005 
State-Changed-Why:  
Awaiting for feedback. Please test patch and respond. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=75634 
State-Changed-From-To: feedback->patched 
State-Changed-By: glebius 
State-Changed-When: Thu Aug 25 13:25:58 GMT 2005 
State-Changed-Why:  
Patch applied to HEAD. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=75634 
State-Changed-From-To: patched->closed 
State-Changed-By: glebius 
State-Changed-When: Thu Nov 3 12:04:15 GMT 2005 
State-Changed-Why:  
Merged to RELENG_5. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=75634 
>Unformatted:
