From nobody@FreeBSD.org  Wed Feb 16 23:16:04 2011
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 5E638106564A
	for <freebsd-gnats-submit@FreeBSD.org>; Wed, 16 Feb 2011 23:16:04 +0000 (UTC)
	(envelope-from nobody@FreeBSD.org)
Received: from red.freebsd.org (red.freebsd.org [IPv6:2001:4f8:fff6::22])
	by mx1.freebsd.org (Postfix) with ESMTP id 4F5C58FC0C
	for <freebsd-gnats-submit@FreeBSD.org>; Wed, 16 Feb 2011 23:16:04 +0000 (UTC)
Received: from red.freebsd.org (localhost [127.0.0.1])
	by red.freebsd.org (8.14.4/8.14.4) with ESMTP id p1GNG4u0081054
	for <freebsd-gnats-submit@FreeBSD.org>; Wed, 16 Feb 2011 23:16:04 GMT
	(envelope-from nobody@red.freebsd.org)
Received: (from nobody@localhost)
	by red.freebsd.org (8.14.4/8.14.4/Submit) id p1GNG44V081053;
	Wed, 16 Feb 2011 23:16:04 GMT
	(envelope-from nobody)
Message-Id: <201102162316.p1GNG44V081053@red.freebsd.org>
Date: Wed, 16 Feb 2011 23:16:04 GMT
From: Andrew Boyer <aboyer@averesystems.com>
To: freebsd-gnats-submit@FreeBSD.org
Subject: [patch] arp sysctl setting log_arp_permanent_modify has no effect
X-Send-Pr-Version: www-3.1
X-GNATS-Notify:

>Number:         154831
>Category:       kern
>Synopsis:       [arp] [patch] arp sysctl setting log_arp_permanent_modify has no effect
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-net
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Wed Feb 16 23:20:08 UTC 2011
>Closed-Date:    Thu Jul 14 04:22:25 UTC 2011
>Last-Modified:  Thu Jul 14 04:30:11 UTC 2011
>Originator:     Andrew Boyer
>Release:        stable/8
>Organization:
Avere Systems
>Environment:
N/A
>Description:
SVN 153513 added a sysctl, net.link.ether.inet.log_arp_permanent_modify, which does not do anything since SVN 186119.  It is simple to re-add.
>How-To-Repeat:
(Develop a networking problem like I've got...)
- Turn off logging with 'sysctl net.link.ether.inet.log_arp_permanent_modify=0'
- Observe that the log messages still appear
>Fix:


Patch attached with submission follows:

Index: sys/netinet/if_ether.c
===================================================================
--- sys/netinet/if_ether.c	(revision 218760)
+++ sys/netinet/if_ether.c	(working copy)
@@ -693,11 +693,13 @@
 		    bcmp(ar_sha(ah), &la->ll_addr, ifp->if_addrlen)) {
 			if (la->la_flags & LLE_STATIC) {
 				LLE_WUNLOCK(la);
-				log(LOG_ERR,
-				    "arp: %*D attempts to modify permanent "
-				    "entry for %s on %s\n",
-				    ifp->if_addrlen, (u_char *)ar_sha(ah), ":",
-				    inet_ntoa(isaddr), ifp->if_xname);
+				if (log_arp_permanent_modify) {
+					log(LOG_ERR,
+					    "arp: %*D attempts to modify permanent "
+					    "entry for %s on %s\n",
+					    ifp->if_addrlen, (u_char *)ar_sha(ah), ":",
+					    inet_ntoa(isaddr), ifp->if_xname);
+				}
 				goto reply;
 			}
 			if (log_arp_movements) {


>Release-Note:
>Audit-Trail:
Responsible-Changed-From-To: freebsd-amd64->freebsd-net 
Responsible-Changed-By: linimon 
Responsible-Changed-When: Fri Feb 18 03:12:20 UTC 2011 
Responsible-Changed-Why:  
Over to maintainer(s). 

http://www.freebsd.org/cgi/query-pr.cgi?pr=154831 
State-Changed-From-To: open->patched 
State-Changed-By: ae 
State-Changed-When: Thu Jul 7 12:00:18 UTC 2011 
State-Changed-Why:  
Committed to head/. Thanks! 

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

From: dfilter@FreeBSD.ORG (dfilter service)
To: bug-followup@FreeBSD.org
Cc:  
Subject: Re: kern/154831: commit references a PR
Date: Thu,  7 Jul 2011 12:00:34 +0000 (UTC)

 Author: ae
 Date: Thu Jul  7 11:59:51 2011
 New Revision: 223840
 URL: http://svn.freebsd.org/changeset/base/223840
 
 Log:
   Add again the checking for log_arp_permanent_modify that was by accident
   removed in the r186119.
   
   PR:		kern/154831
   MFC after:	1 week
 
 Modified:
   head/sys/netinet/if_ether.c
 
 Modified: head/sys/netinet/if_ether.c
 ==============================================================================
 --- head/sys/netinet/if_ether.c	Thu Jul  7 10:37:14 2011	(r223839)
 +++ head/sys/netinet/if_ether.c	Thu Jul  7 11:59:51 2011	(r223840)
 @@ -694,11 +694,13 @@ match:
  		    bcmp(ar_sha(ah), &la->ll_addr, ifp->if_addrlen)) {
  			if (la->la_flags & LLE_STATIC) {
  				LLE_WUNLOCK(la);
 -				log(LOG_ERR,
 -				    "arp: %*D attempts to modify permanent "
 -				    "entry for %s on %s\n",
 -				    ifp->if_addrlen, (u_char *)ar_sha(ah), ":",
 -				    inet_ntoa(isaddr), ifp->if_xname);
 +				if (log_arp_permanent_modify)
 +					log(LOG_ERR,
 +					    "arp: %*D attempts to modify "
 +					    "permanent entry for %s on %s\n",
 +					    ifp->if_addrlen,
 +					    (u_char *)ar_sha(ah), ":",
 +					    inet_ntoa(isaddr), ifp->if_xname);
  				goto reply;
  			}
  			if (log_arp_movements) {
 _______________________________________________
 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: ae 
State-Changed-When: Thu Jul 14 04:21:55 UTC 2011 
State-Changed-Why:  
Merged to stable/8. Thanks! 

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

From: dfilter@FreeBSD.ORG (dfilter service)
To: bug-followup@FreeBSD.org
Cc:  
Subject: Re: kern/154831: commit references a PR
Date: Thu, 14 Jul 2011 04:21:36 +0000 (UTC)

 Author: ae
 Date: Thu Jul 14 04:21:27 2011
 New Revision: 223995
 URL: http://svn.freebsd.org/changeset/base/223995
 
 Log:
   MFC r223840:
     Add again the checking for log_arp_permanent_modify that was by accident
     removed in the r186119.
   
     PR:		kern/154831
 
 Modified:
   stable/8/sys/netinet/if_ether.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)
 
 Modified: stable/8/sys/netinet/if_ether.c
 ==============================================================================
 --- stable/8/sys/netinet/if_ether.c	Thu Jul 14 03:16:43 2011	(r223994)
 +++ stable/8/sys/netinet/if_ether.c	Thu Jul 14 04:21:27 2011	(r223995)
 @@ -680,11 +680,13 @@ match:
  		    bcmp(ar_sha(ah), &la->ll_addr, ifp->if_addrlen)) {
  			if (la->la_flags & LLE_STATIC) {
  				LLE_WUNLOCK(la);
 -				log(LOG_ERR,
 -				    "arp: %*D attempts to modify permanent "
 -				    "entry for %s on %s\n",
 -				    ifp->if_addrlen, (u_char *)ar_sha(ah), ":",
 -				    inet_ntoa(isaddr), ifp->if_xname);
 +				if (log_arp_permanent_modify)
 +					log(LOG_ERR,
 +					    "arp: %*D attempts to modify "
 +					    "permanent entry for %s on %s\n",
 +					    ifp->if_addrlen,
 +					    (u_char *)ar_sha(ah), ":",
 +					    inet_ntoa(isaddr), ifp->if_xname);
  				goto reply;
  			}
  			if (log_arp_movements) {
 _______________________________________________
 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:
