svn commit: r196386 - head/sys/dev/e1000

Xin LI delphij at FreeBSD.org
Wed Aug 19 17:59:42 UTC 2009


Author: delphij
Date: Wed Aug 19 17:59:41 2009
New Revision: 196386
URL: http://svn.freebsd.org/changeset/base/196386

Log:
  Temporarily enhance em(4) and igb(4) hack to take account for IFF_NOARP.
  Without this changeset there will be no way to prevent these NICs from
  sending ARP, which is harmful in server farms that is configured as
  "Direct Server Return" behind a load balancer.
  
  A better fix would remove the whole hack completely but it would be
  later than 8.0-RELEASE.
  
  Reviewed by:	jfv, yongari
  Approved by:	re (kib)

Modified:
  head/sys/dev/e1000/if_em.c
  head/sys/dev/e1000/if_igb.c

Modified: head/sys/dev/e1000/if_em.c
==============================================================================
--- head/sys/dev/e1000/if_em.c	Wed Aug 19 17:45:58 2009	(r196385)
+++ head/sys/dev/e1000/if_em.c	Wed Aug 19 17:59:41 2009	(r196386)
@@ -1204,7 +1204,8 @@ em_ioctl(struct ifnet *ifp, u_long comma
 				em_init_locked(adapter);
 				EM_CORE_UNLOCK(adapter);
 			}
-			arp_ifinit(ifp, ifa);
+			if (!(ifp->if_flags & IFF_NOARP))
+				arp_ifinit(ifp, ifa);
 		} else
 #endif
 			error = ether_ioctl(ifp, command, data);

Modified: head/sys/dev/e1000/if_igb.c
==============================================================================
--- head/sys/dev/e1000/if_igb.c	Wed Aug 19 17:45:58 2009	(r196385)
+++ head/sys/dev/e1000/if_igb.c	Wed Aug 19 17:59:41 2009	(r196386)
@@ -952,7 +952,8 @@ igb_ioctl(struct ifnet *ifp, u_long comm
 				igb_init_locked(adapter);
 				IGB_CORE_UNLOCK(adapter);
 			}
-			arp_ifinit(ifp, ifa);
+			if (!(ifp->if_flags & IFF_NOARP))
+				arp_ifinit(ifp, ifa);
 		} else
 #endif
 			error = ether_ioctl(ifp, command, data);


More information about the svn-src-head mailing list