Subject: Re: permiscuous mode on vr driver causes lots of (unwarranted) icmp-redirects
To: Laine Stump <lainestump@rcn.com>
From: Jason Thorpe <thorpej@nas.nasa.gov>
List: current-users
Date: 09/19/1999 12:10:43
On Sat, 18 Sep 1999 19:13:11 -0400 
 Laine Stump <lainestump@rcn.com> wrote:

 > This doesn't appear to happen with the ne driver (although I'm unable to
 > test exactly the same circumstances, since my ne card is 10mbit, while most
 > of the rest of my network is 100mbit) using the same OS, nor with the old
 > DE driver running on 1.3.3.

Can you please try the following patch, and let me know if it fixes the
problem?

        -- Jason R. Thorpe <thorpej@nas.nasa.gov>

Index: if_vr.c
===================================================================
RCS file: /cvsroot/syssrc/sys/dev/pci/if_vr.c,v
retrieving revision 1.25
diff -c -r1.25 if_vr.c
*** if_vr.c	1999/08/14 11:23:39	1.25
--- if_vr.c	1999/09/19 19:09:13
***************
*** 878,885 ****
  		if (ifp->if_bpf) {
  			bpf_mtap(ifp->if_bpf, m);
  			if ((ifp->if_flags & IFF_PROMISC) != 0 &&
! 			    (rxstat & (VR_RXSTAT_RX_PHYS | VR_RXSTAT_RX_BROAD |
! 				       VR_RXSTAT_RX_MULTI)) == 0) {
  				m_freem(m);
  				continue;
  			}
--- 878,886 ----
  		if (ifp->if_bpf) {
  			bpf_mtap(ifp->if_bpf, m);
  			if ((ifp->if_flags & IFF_PROMISC) != 0 &&
! 			    ETHER_IS_MULTI(eh->ether_dhost) == 0 &&
! 			    memcmp(eh->ether_dhost, LLADDR(ifp->if_sadl),
! 				   ETHER_ADDR_LEN) != 0) {
  				m_freem(m);
  				continue;
  			}