From nobody@FreeBSD.org  Tue Jul 20 11:46:21 2010
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 519CF1065677
	for <freebsd-gnats-submit@FreeBSD.org>; Tue, 20 Jul 2010 11:46:21 +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 41F968FC18
	for <freebsd-gnats-submit@FreeBSD.org>; Tue, 20 Jul 2010 11:46:21 +0000 (UTC)
Received: from www.freebsd.org (localhost [127.0.0.1])
	by www.freebsd.org (8.14.3/8.14.3) with ESMTP id o6KBkKBw093629
	for <freebsd-gnats-submit@FreeBSD.org>; Tue, 20 Jul 2010 11:46:20 GMT
	(envelope-from nobody@www.freebsd.org)
Received: (from nobody@localhost)
	by www.freebsd.org (8.14.3/8.14.3/Submit) id o6KBkK4X093628;
	Tue, 20 Jul 2010 11:46:20 GMT
	(envelope-from nobody)
Message-Id: <201007201146.o6KBkK4X093628@www.freebsd.org>
Date: Tue, 20 Jul 2010 11:46:20 GMT
From: grayich <grayich@ukr.net>
To: freebsd-gnats-submit@FreeBSD.org
Subject: arp pub not working properly
X-Send-Pr-Version: www-3.1
X-GNATS-Notify:

>Number:         148784
>Category:       kern
>Synopsis:       [arp] arp pub not working properly
>Confidential:   no
>Severity:       serious
>Priority:       high
>Responsible:    glebius
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Tue Jul 20 11:50:01 UTC 2010
>Closed-Date:    Thu Sep 16 14:56:30 UTC 2010
>Last-Modified:  Thu Sep 16 15:00:02 UTC 2010
>Originator:     grayich
>Release:        8.0-RELEASE 8.1-RELEASE
>Organization:
>Environment:
>Description:
arp pub not working properly

Repeat http://www.freebsd.org/cgi/query-pr.cgi?pr=kern/146539

There is an active network with users 10.10.10.0/24 (fxp0)

---
#!/bin/sh
arp -ad > /dev/null
I=1
while [ $I -le 253 ] 
do 
    I=$(expr $I + 1)
    arp -S 10.10.10.${I} 00:00:00:00:00:00 pub > /dev/null
done
#
arp -an|egrep -v "10.10.10.1|published"
exit 0
---

execute script 1-40 times
Sometimes the output string:
? (10.10.10.44) at 00:00:00:00:00:00 on fxp0 permanent [ethernet]
? (10.10.10.101) at 00:00:00:00:00:00 on fxp0 permanent [ethernet]
? (10.10.10.132) at 00:00:00:00:00:00 on fxp0 permanent [ethernet]

not prescribed published
must:
? (10.10.10.44) at 00:00:00:00:00:00 on fxp0 permanent published [ethernet]
? (10.10.10.101) at 00:00:00:00:00:00 on fxp0 permanent published [ethernet]
? (10.10.10.132) at 00:00:00:00:00:00 on fxp0 permanent published [ethernet]

ip can be any
00:00:00:00:00:00 taken as an example

same thing when using 'arp -da; arp -f file'


repeat.
the problem is variable, sometimes there is sometimes no

>How-To-Repeat:

>Fix:


>Release-Note:
>Audit-Trail:
Responsible-Changed-From-To: freebsd-bugs->freebsd-net 
Responsible-Changed-By: arundel 
Responsible-Changed-When: Tue Jul 20 21:40:58 UTC 2010 
Responsible-Changed-Why:  
Over to maintainer(s) 


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

From: Gleb Smirnoff <glebius@FreeBSD.org>
To: grayich <grayich@ukr.net>
Cc: freebsd-gnats-submit@FreeBSD.org
Subject: Re: kern/148784: arp pub not working properly
Date: Thu, 22 Jul 2010 19:11:18 +0400

 --VS++wcV0S1rZb1Fb
 Content-Type: text/plain; charset=koi8-r
 Content-Disposition: inline
 
   Please try the attached patch and report whether it works.
 
 -- 
 Totus tuus, Glebius.
 
 --VS++wcV0S1rZb1Fb
 Content-Type: text/x-diff; charset=koi8-r
 Content-Disposition: attachment; filename="if_llatbl.c.diff"
 
 Index: if_llatbl.c
 ===================================================================
 --- if_llatbl.c	(revision 210371)
 +++ if_llatbl.c	(working copy)
 @@ -337,6 +337,7 @@
  			 * LLE_DELETED flag, and reset the expiration timer
  			 */
  			bcopy(LLADDR(dl), &lle->ll_addr, ifp->if_addrlen);
 +			lle->la_flags |= (flags & (LLE_PUB | LLE_PROXY));
  			lle->la_flags |= LLE_VALID;
  			lle->la_flags &= ~LLE_DELETED;
  #ifdef INET6
 
 --VS++wcV0S1rZb1Fb--
State-Changed-From-To: open->patched 
State-Changed-By: glebius 
State-Changed-When: Tue Jul 27 10:04:24 UTC 2010 
State-Changed-Why:  
Fixed in head/. 


Responsible-Changed-From-To: freebsd-net->glebius 
Responsible-Changed-By: glebius 
Responsible-Changed-When: Tue Jul 27 10:04:24 UTC 2010 
Responsible-Changed-Why:  
Fixed in head/. 

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

From: dfilter@FreeBSD.ORG (dfilter service)
To: bug-followup@FreeBSD.org
Cc:  
Subject: Re: kern/148784: commit references a PR
Date: Tue, 27 Jul 2010 10:05:48 +0000 (UTC)

 Author: glebius
 Date: Tue Jul 27 10:05:27 2010
 New Revision: 210529
 URL: http://svn.freebsd.org/changeset/base/210529
 
 Log:
   When installing a new ARP entry via 'arp -S', lla_lookup() will
   either find an existing entry, or allocate a new one. In the latter
   case an entry would have flags, that were supplied as argument to
   lla_lookup(). In case of an existing entry, flags aren't modified.
   
   This lead to losing LLE_PUB and/or LLE_PROXY flags.
   
   We should apply these flags either in lla_rt_output() or in the
   in.c:in_lltable_lookup(). It seems to me that lla_rt_output() is
   a more correct choice.
   
   PR:		kern/148784, kern/146539
   Silence from:	qingli, 5 days
 
 Modified:
   head/sys/net/if_llatbl.c
 
 Modified: head/sys/net/if_llatbl.c
 ==============================================================================
 --- head/sys/net/if_llatbl.c	Tue Jul 27 09:22:41 2010	(r210528)
 +++ head/sys/net/if_llatbl.c	Tue Jul 27 10:05:27 2010	(r210529)
 @@ -337,6 +337,7 @@ lla_rt_output(struct rt_msghdr *rtm, str
  			 * LLE_DELETED flag, and reset the expiration timer
  			 */
  			bcopy(LLADDR(dl), &lle->ll_addr, ifp->if_addrlen);
 +			lle->la_flags |= (flags & (LLE_PUB | LLE_PROXY));
  			lle->la_flags |= LLE_VALID;
  			lle->la_flags &= ~LLE_DELETED;
  #ifdef INET6
 _______________________________________________
 svn-src-all@freebsd.org mailing list
 http://lists.freebsd.org/mailman/listinfo/svn-src-all
 To unsubscribe, send any mail to "svn-src-all-unsubscribe@freebsd.org"
 
State-Changed-From-To: patched->closed 
State-Changed-By: glebius 
State-Changed-When: Thu Sep 16 14:31:11 UTC 2010 
State-Changed-Why:  
Merged to stable/8. 

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

From: dfilter@FreeBSD.ORG (dfilter service)
To: bug-followup@FreeBSD.org
Cc:  
Subject: Re: kern/148784: commit references a PR
Date: Thu, 16 Sep 2010 14:55:27 +0000 (UTC)

 Author: glebius
 Date: Thu Sep 16 14:55:22 2010
 New Revision: 212735
 URL: http://svn.freebsd.org/changeset/base/212735
 
 Log:
   MFhead 210529:
     When installing a new ARP entry via 'arp -S', lla_lookup() will
     either find an existing entry, or allocate a new one. In the latter
     case an entry would have flags, that were supplied as argument to
     lla_lookup(). In case of an existing entry, flags aren't modified.
   
     This lead to losing LLE_PUB and/or LLE_PROXY flags.
   
     We should apply these flags either in lla_rt_output() or in the
     in.c:in_lltable_lookup(). It seems to me that lla_rt_output() is
     a more correct choice.
   
     PR:           kern/148784, kern/146539
 
 Modified:
   stable/8/sys/net/if_llatbl.c
 Directory Properties:
   stable/8/sys/   (props changed)
   stable/8/sys/amd64/include/xen/   (props changed)
   stable/8/sys/cddl/contrib/opensolaris/   (props changed)
   stable/8/sys/contrib/dev/acpica/   (props changed)
   stable/8/sys/contrib/pf/   (props changed)
   stable/8/sys/dev/xen/xenpci/   (props changed)
 
 Modified: stable/8/sys/net/if_llatbl.c
 ==============================================================================
 --- stable/8/sys/net/if_llatbl.c	Thu Sep 16 14:30:32 2010	(r212734)
 +++ stable/8/sys/net/if_llatbl.c	Thu Sep 16 14:55:22 2010	(r212735)
 @@ -337,6 +337,7 @@ lla_rt_output(struct rt_msghdr *rtm, str
  			 * LLE_DELETED flag, and reset the expiration timer
  			 */
  			bcopy(LLADDR(dl), &lle->ll_addr, ifp->if_addrlen);
 +			lle->la_flags |= (flags & (LLE_PUB | LLE_PROXY));
  			lle->la_flags |= LLE_VALID;
  			lle->la_flags &= ~LLE_DELETED;
  #ifdef INET6
 _______________________________________________
 svn-src-all@freebsd.org mailing list
 http://lists.freebsd.org/mailman/listinfo/svn-src-all
 To unsubscribe, send any mail to "svn-src-all-unsubscribe@freebsd.org"
 
>Unformatted:
