diff -Nur --exclude=compile --exclude=*.orig --exclude=drawbr* --exclude=DRAWBRIDGE --exclude=newvers.sh /sys/conf/files sys/conf/files
--- /sys/conf/files	Tue Jun 23 16:33:18 1998
+++ sys/conf/files	Wed Dec  2 00:14:02 1998
@@ -161,6 +161,7 @@
 msdosfs/msdosfs_vnops.c		optional msdosfs
 net/bpf.c		optional bpfilter
 net/bpf_filter.c	optional bpfilter
+net/drawbridge.c	optional drawbridge
 net/bsd_comp.c		optional ppp_bsdcomp
 net/if.c		standard
 net/if_disc.c		optional disc
diff -Nur --exclude=compile --exclude=*.orig --exclude=drawbr* --exclude=DRAWBRIDGE --exclude=newvers.sh /sys/dev/pdq/pdq.c sys/dev/pdq/pdq.c
--- /sys/dev/pdq/pdq.c	Fri Jan 17 17:54:31 1997
+++ sys/dev/pdq/pdq.c	Wed Dec  2 00:14:02 1998
@@ -42,6 +42,11 @@
 #if defined(__FreeBSD__)
 #include <dev/pdq/pdqvar.h>
 #include <dev/pdq/pdqreg.h>
+#include "drawbridge.h"
+#if NDRAWBRIDGE > 0
+#include <net/drawbrdg.h>
+extern Statistics DBstats;
+#endif
 #else
 #include "pdqvar.h"
 #include "pdqreg.h"
@@ -531,6 +536,25 @@
 	case PDQC_ADDR_FILTER_SET: {
 	    pdq_cmd_addr_filter_set_t *addr_filter_set = (pdq_cmd_addr_filter_set_t *) ci->ci_bufstart;
 	    pdq_lanaddr_t *addr = addr_filter_set->addr_filter_set_addresses;
+
+#if NDRAWBRIDGE > 0
+	    /*
+	     * Add a bogus mac address to the filter table to turn on ring
+	     * scrubbing when transmitting a packet with a foreign mac
+	     * address.  Also known as bridge stripping.  This could also
+	     * be done without modifying the driver by adding a multicast
+	     * address through the OS but I decided to make sure the card
+	     * always has an extra address loaded so ring scrubbing is always
+	     * enabled.
+	     */
+	    addr->lanaddr_bytes[0] = 0x02;
+	    addr->lanaddr_bytes[1] = 0x02;
+	    addr->lanaddr_bytes[2] = 0x02;
+	    addr->lanaddr_bytes[3] = 0x02;
+	    addr->lanaddr_bytes[4] = 0x02;
+	    addr->lanaddr_bytes[5] = 0x02;
+	    addr++;
+#endif
 	    addr->lanaddr_bytes[0] = 0xFF;
 	    addr->lanaddr_bytes[1] = 0xFF;
 	    addr->lanaddr_bytes[2] = 0xFF;
@@ -538,7 +562,14 @@
 	    addr->lanaddr_bytes[4] = 0xFF;
 	    addr->lanaddr_bytes[5] = 0xFF;
 	    addr++;
+#if NDRAWBRIDGE > 0
+	    /*
+	     * We now have room for one less address
+	     */
+	    pdq_os_addr_fill(pdq, addr, 60);
+#else
 	    pdq_os_addr_fill(pdq, addr, 61);
+#endif
 	    break;
 	}
 	default: {	/* to make gcc happy */
@@ -715,6 +746,9 @@
 	    PDQ_OS_DATABUF_ALLOC(npdu);
 	    if (npdu == NULL) {
 		PDQ_PRINTF(("discard: no databuf #0\n"));
+#if NDRAWBRIDGE > 0
+		DBstats.droppedNoMbufs++;
+#endif
 		goto discard_frame;
 	    }
 	    buffers[completion] = npdu;
@@ -723,6 +757,9 @@
 		if (npdu == NULL) {
 		    PDQ_OS_DATABUF_NEXT_SET(lpdu, NULL);
 		    PDQ_OS_DATABUF_FREE(fpdu);
+#if NDRAWBRIDGE > 0
+		    DBstats.droppedNoMbufs++;
+#endif
 		    goto discard_frame;
 		}
 		PDQ_OS_DATABUF_NEXT_SET(lpdu, buffers[(completion + idx) & ring_mask]);
diff -Nur --exclude=compile --exclude=*.orig --exclude=drawbr* --exclude=DRAWBRIDGE --exclude=newvers.sh /sys/dev/vx/if_vx.c sys/dev/vx/if_vx.c
--- /sys/dev/vx/if_vx.c	Mon Mar  2 04:46:44 1998
+++ sys/dev/vx/if_vx.c	Wed Dec  2 00:14:02 1998
@@ -88,6 +88,12 @@
 #include <net/bpf.h>
 #endif
 
+#include "drawbridge.h"
+#if NDRAWBRIDGE > 0
+#include <net/drawbrdg.h>
+extern Statistics DBstats;
+#endif
+
 #include <machine/clock.h>
 
 #include <dev/vx/if_vxreg.h>
@@ -762,18 +768,21 @@
     }
 #endif
 
+    /* If Drawbridge is enabled, always pass the packet up */
+#if NDRAWBRIDGE < 1
     /*
      * XXX: Some cards seem to be in promiscous mode all the time.
      * we need to make sure we only get our own stuff always.
      * bleah!
      */
-
     if ((eh->ether_dhost[0] & 1) == 0 && /* !mcast and !bcast */
 	bcmp(eh->ether_dhost, sc->arpcom.ac_enaddr,
 	sizeof(eh->ether_dhost)) != 0) {
 	m_freem(m);
 	    return;
     }
+#endif /* NDRAWBRIDGE < 1 */
+
     /* We assume the header fit entirely in one mbuf. */
     m_adj(m, sizeof(struct ether_header));
     ether_input(ifp, eh, m);
@@ -865,6 +874,9 @@
                 if (m == 0) {
                     splx(sh);
                     m_freem(top);
+#if NDRAWBRIDGE > 0
+                    DBstats.droppedNoMbufs++;
+#endif
                     return 0;
                 }
             } else {
diff -Nur --exclude=compile --exclude=*.orig --exclude=drawbr* --exclude=DRAWBRIDGE --exclude=newvers.sh /sys/i386/boot/biosboot/boot.c sys/i386/boot/biosboot/boot.c
--- /sys/i386/boot/biosboot/boot.c	Fri Feb 27 16:56:14 1998
+++ sys/i386/boot/biosboot/boot.c	Wed Dec  2 00:14:02 1998
@@ -140,13 +140,18 @@
 	} else
 #endif	/*NAMEBLOCK*/
 		name = "kernel";
+loadstart:
+	/*
+	 * Ignore flags from previous attempted boot, if any.
+	 */
+	loadflags &= (RB_DUAL | RB_SERIAL);
+
 	if (boot_config[0] != '\0') {
 		printf("boot.config: %s", boot_config);
 		getbootdev(boot_config, &loadflags);
 		if (openrd() != 0)
 			name = "kernel";
 	}
-loadstart:
 	/* print this all each time.. (saves space to do so) */
 	/* If we have looped, use the previous entries as defaults */
 	printf("\r \n>> FreeBSD BOOT @ 0x%x: %d/%d k of memory, %s%s console\n"
@@ -159,13 +164,6 @@
 	       dosdev & 0x7f, devs[maj], unit, 'a' + part,
 	       name ? name : "*specify_a_kernel_name*",
 	       boot_help);
-
-	/*
-	 * Ignore flags from previous attempted boot, if any.
-	 * XXX this is now too strict.  Settings given in boot.config should
-	 * not be changed.
-	 */
-	loadflags &= (RB_DUAL | RB_SERIAL);
 
 	/*
 	 * Be paranoid and make doubly sure that the input buffer is empty.
diff -Nur --exclude=compile --exclude=*.orig --exclude=drawbr* --exclude=DRAWBRIDGE --exclude=newvers.sh /sys/i386/i386/userconfig.c sys/i386/i386/userconfig.c
--- /sys/i386/i386/userconfig.c	Tue Jul 21 06:50:56 1998
+++ sys/i386/i386/userconfig.c	Wed Dec  2 00:14:02 1998
@@ -125,7 +125,7 @@
 
 static struct isa_device *isa_devlist;	/* list read by dset to extract changes */
 
-#ifdef USERCONFIG_BOOT
+#ifdef USERCONFIG
 char userconfig_from_boot[512] = "";
 static int userconfig_boot_parsing;	/* set if we are reading from the boot instructions */
 
@@ -150,9 +150,9 @@
 	return cngetc();
     }
 }
-#else /* !USERCONFIG_BOOT */
+#else /* !USERCONFIG */
 #define getchar()	cngetc()
-#endif /* USERCONFIG_BOOT */
+#endif /* USERCONFIG */
 
 #define putchar(x)	cnputc(x)
 
@@ -2424,7 +2424,7 @@
 static int set_device_disable(CmdParm *);
 static int quitfunc(CmdParm *);
 static int helpfunc(CmdParm *);
-#if defined(USERCONFIG_BOOT)
+#if defined(USERCONFIG)
 static int introfunc(CmdParm *);
 #endif
 
@@ -2487,7 +2487,7 @@
     { "ex", 	quitfunc, 		NULL },		/* exit (quit)	*/
     { "f",	set_device_flags,	int_parms },	/* flags dev mask */
     { "h", 	helpfunc, 		NULL },		/* help		*/
-#if defined(USERCONFIG_BOOT)
+#if defined(USERCONFIG)
     { "intro", 	introfunc, 		NULL },		/* intro screen	*/
 #endif
     { "iom",	set_device_mem,		addr_parms },	/* iomem dev addr */
@@ -2883,7 +2883,7 @@
     return 0;
 }
 
-#if defined(USERCONFIG_BOOT) 
+#if defined(USERCONFIG) 
 
 #if defined (VISUAL_USERCONFIG)
 static void
diff -Nur --exclude=compile --exclude=*.orig --exclude=drawbr* --exclude=DRAWBRIDGE --exclude=newvers.sh /sys/i386/isa/if_cs.c sys/i386/isa/if_cs.c
--- /sys/i386/isa/if_cs.c	Mon Jul 20 16:00:02 1998
+++ sys/i386/isa/if_cs.c	Wed Dec  2 00:14:03 1998
@@ -76,6 +76,12 @@
 #include <net/bpfdesc.h>
 #endif
 
+#include "drawbridge.h"
+#if NDRAWBRIDGE > 0 
+#include <net/drawbrdg.h>
+extern Statistics DBstats;
+#endif      
+
 #include <machine/clock.h>
 #include <machine/md_var.h>
 
@@ -760,12 +766,22 @@
 
 	MGETHDR(m, M_DONTWAIT, MT_DATA);
 	if (m==NULL)
+#if NDRAWBRIDGE > 0
+	{   
+		DBstats.droppedNoMbufs++;
+		return -1;
+	}   
+#else      
 		return -1;
+#endif
 
 	if (length > MHLEN) {
 		MCLGET(m, M_DONTWAIT);
 		if (!(m->m_flags & M_EXT)) {
 			m_freem(m);
+#if NDRAWBRIDGE > 0
+			DBstats.droppedNoMbufs++;
+#endif
 			return -1;
 		}
 	}
@@ -791,8 +807,10 @@
 	printf( "\n" );
 #endif
 
+#if NDRAWBRIDGE < 1
 	if (status & (RX_IA | RX_BROADCAST) || 
 	    (ifp->if_flags & IFF_MULTICAST && status & RX_HASHED)) {
+#endif
 		m->m_pkthdr.len -= sizeof(struct ether_header);
 		m->m_len -= sizeof(struct ether_header);
 		m->m_data += sizeof(struct ether_header);
@@ -804,9 +822,11 @@
 
 		if (length==ETHER_MAX_LEN-ETHER_CRC_LEN)
                         DELAY( CS_WAIT_NEXT_PACKET );
+#if NDRAWBRIDGE < 1
 	} else {
 		m_freem(m);
 	}
+#endif
 
 	return 0;
 }
@@ -859,6 +879,9 @@
 
                 case ISQ_RX_MISS_EVENT:
                         ifp->if_ierrors+=(status>>6);
+#if NDRAWBRIDGE > 0
+			DBstats.droppedNoMbufs++;
+#endif
                         break;
 
                 case ISQ_TX_COL_EVENT:
diff -Nur --exclude=compile --exclude=*.orig --exclude=drawbr* --exclude=DRAWBRIDGE --exclude=newvers.sh /sys/i386/isa/if_ed.c sys/i386/isa/if_ed.c
--- /sys/i386/isa/if_ed.c	Tue Jul  7 00:23:02 1998
+++ sys/i386/isa/if_ed.c	Wed Dec  2 00:14:03 1998
@@ -78,6 +78,12 @@
 #include <net/bpfdesc.h>
 #endif
 
+#include "drawbridge.h"
+#if NDRAWBRIDGE > 0
+#include <net/drawbrdg.h>
+extern Statistics DBstats;
+#endif
+
 #include <machine/clock.h>
 #include <machine/md_var.h>
 
@@ -2612,7 +2618,7 @@
 			}
 		}
 
-#if NBPFILTER > 0
+#if ((NBPFILTER > 0) || (NDRAWBRIDGE > 0))
 
 		/*
 		 * Promiscuous flag may have changed, so reprogram the RCR.
@@ -2725,8 +2731,15 @@
 
 	/* Allocate a header mbuf */
 	MGETHDR(m, M_DONTWAIT, MT_DATA);
+#if NDRAWBRIDGE > 0
+	if (m == NULL) {
+		DBstats.droppedNoMbufs++;
+		return;
+	}
+#else
 	if (m == NULL)
 		return;
+#endif
 	m->m_pkthdr.rcvif = &sc->arpcom.ac_if;
 	m->m_pkthdr.len = m->m_len = len;
 
@@ -2743,6 +2756,9 @@
 		/* Insist on getting a cluster */
 		if ((m->m_flags & M_EXT) == 0) {
 			m_freem(m);
+#if NDRAWBRIDGE > 0
+			DBstats.droppedNoMbufs++;
+#endif
 			return;
 		}
 	}
@@ -2768,6 +2784,9 @@
 	if (sc->arpcom.ac_if.if_bpf) {
 		bpf_mtap(&sc->arpcom.ac_if, m);
 
+		/* If Drawbridge is enabled, always pass the packet up */
+#if NDRAWBRIDGE < 1
+
 		/*
 		 * Note that the interface cannot be in promiscuous mode if
 		 * there are no BPF listeners.  And if we are in promiscuous
@@ -2779,6 +2798,7 @@
 			m_freem(m);
 			return;
 		}
+#endif /* NDRAWBRIDGE < 1 */
 	}
 #endif
 
@@ -3313,9 +3333,14 @@
 		 */
 		/* Set page 0 registers */
 		outb(sc->nic_addr + ED_P0_CR, sc->cr_proto | ED_CR_STP);
-
+#if NDRAWBRIDGE > 0
+		/* If drawbridge is enabled, do not accept runts and errors */
+		outb(sc->nic_addr + ED_P0_RCR, ED_RCR_PRO | ED_RCR_AM |
+		     ED_RCR_AB ); 
+#else
 		outb(sc->nic_addr + ED_P0_RCR, ED_RCR_PRO | ED_RCR_AM |
 		     ED_RCR_AB | ED_RCR_AR | ED_RCR_SEP);
+#endif
 	} else {
 		/* set up multicast addresses and filter modes */
 		if (ifp->if_flags & IFF_MULTICAST) {
diff -Nur --exclude=compile --exclude=*.orig --exclude=drawbr* --exclude=DRAWBRIDGE --exclude=newvers.sh /sys/i386/isa/if_el.c sys/i386/isa/if_el.c
--- /sys/i386/isa/if_el.c	Fri Sep  6 18:07:32 1996
+++ sys/i386/isa/if_el.c	Wed Dec  2 00:14:03 1998
@@ -21,6 +21,11 @@
  */
 #include "el.h"
 #include "bpfilter.h"
+#include "drawbridge.h"
+#if NDRAWBRIDGE > 0
+#include <net/drawbrdg.h>
+extern Statistics DBstats;
+#endif
 
 #include <sys/param.h>
 #include <sys/systm.h>
@@ -561,6 +566,9 @@
 		bpf_tap(&sc->arpcom.ac_if, buf, 
 			len + sizeof(struct ether_header));
 
+		/* If Drawbridge is enabled, always pass the packet up */
+#if NDRAWBRIDGE < 1
+
 		/*
 		 * Note that the interface cannot be in promiscuous mode if
 		 * there are no bpf listeners.  And if el are in promiscuous
@@ -574,6 +582,7 @@
 		   && bcmp(eh->ether_dhost,etherbroadcastaddr,
 			   sizeof(eh->ether_dhost)) != 0)
 			return;
+#endif /* NDRAWBRIDGE < 1 */
 	}
 #endif
 
@@ -613,8 +622,15 @@
         }
 
         MGETHDR(m, M_DONTWAIT, MT_DATA);
+#if NDRAWBRIDGE > 0
+        if (m == 0) {
+		DBstats.droppedNoMbufs++;
+                return (0);
+	}
+#else
         if (m == 0)
                 return (0);
+#endif
         m->m_pkthdr.rcvif = ifp;
         m->m_pkthdr.len = totlen;
         m->m_len = MHLEN;
@@ -625,6 +641,9 @@
                         MGET(m, M_DONTWAIT, MT_DATA);
                         if (m == 0) {
                                 m_freem(top);
+#if NDRAWBRIDGE > 0
+                                DBstats.droppedNoMbufs++;
+#endif
                                 return (0);
                         }
                         m->m_len = MLEN;
diff -Nur --exclude=compile --exclude=*.orig --exclude=drawbr* --exclude=DRAWBRIDGE --exclude=newvers.sh /sys/i386/isa/if_ep.c sys/i386/isa/if_ep.c
--- /sys/i386/isa/if_ep.c	Sat Apr 18 18:25:08 1998
+++ sys/i386/isa/if_ep.c	Wed Dec  2 00:14:03 1998
@@ -103,6 +103,12 @@
 #include <net/bpfdesc.h>
 #endif
 
+#include "drawbridge.h"
+#if NDRAWBRIDGE > 0
+#include <net/drawbrdg.h>
+extern Statistics DBstats;
+#endif
+
 #if defined(__FreeBSD__)
 #include <machine/clock.h>
 #endif
@@ -1173,6 +1179,9 @@
     if (ifp->if_bpf) {
 	bpf_mtap(ifp, top);
 
+	/* If Drawbridge is enabled, always pass the packet up */
+#if NDRAWBRIDGE < 1
+
 	/*
 	 * Note that the interface cannot be in promiscuous mode if there are
 	 * no BPF listeners.  And if we are in promiscuous mode, we have to
@@ -1197,6 +1206,7 @@
 	    outw(BASE + EP_COMMAND, SET_RX_EARLY_THRESH | RX_INIT_EARLY_THRESH);
 	    return;
 	}
+#endif /* NDRAWBRIDGE < 1 */
     }
 #endif
 
@@ -1215,6 +1225,9 @@
 	sc->top = 0;
 #ifdef EP_LOCAL_STATS
 	sc->rx_no_mbuf++;
+#endif
+#if NDRAWBRIDGE > 0
+	DBstats.droppedNoMbufs++;
 #endif
     }
     ep_fset(F_RX_FIRST);
diff -Nur --exclude=compile --exclude=*.orig --exclude=drawbr* --exclude=DRAWBRIDGE --exclude=newvers.sh /sys/i386/isa/if_ex.c sys/i386/isa/if_ex.c
--- /sys/i386/isa/if_ex.c	Fri Sep 26 12:25:04 1997
+++ sys/i386/isa/if_ex.c	Wed Dec  2 00:14:03 1998
@@ -74,6 +74,12 @@
 #include <net/bpfdesc.h>
 #endif
 
+#include "drawbridge.h"
+#if NDRAWBRIDGE > 0
+#include <net/drawbrdg.h>
+extern Statistics DBstats;
+#endif
+
 #include <machine/clock.h>
 
 #include <i386/isa/isa_device.h>
@@ -683,9 +689,12 @@
     if (rx_status & RCV_OK_bit) {
       MGETHDR(m, M_DONTWAIT, MT_DATA);
       ipkt = m;
-      if (ipkt == NULL)
+      if (ipkt == NULL) {
 	ifp->if_iqdrops++;
-      else {
+#if NDRAWBRIDGE > 0
+	DBstats.droppedNoMbufs++;
+#endif
+      } else {
 	ipkt->m_pkthdr.rcvif = ifp;
 	ipkt->m_pkthdr.len = pkt_len;
 	ipkt->m_len = MHLEN;
@@ -697,6 +706,9 @@
 	    else {
 	      m_freem(ipkt);
 	      ifp->if_iqdrops++;
+#if NDRAWBRIDGE > 0
+	      DBstats.droppedNoMbufs++;
+#endif
 	      goto rx_another;
 	    }
 	  }
@@ -715,6 +727,9 @@
 	    if (m->m_next == NULL) {
 	      m_freem(ipkt);
 	      ifp->if_iqdrops++;
+#if NDRAWBRIDGE > 0
+	      DBstats.droppedNoMbufs++;
+#endif
 	      goto rx_another;
 	    }
 	    m = m->m_next;
@@ -734,6 +749,9 @@
 	if (ifp->if_bpf != NULL) {
 		bpf_mtap(ifp, ipkt);
 
+		/* If Drawbridge is enabled, always pass the packet up */
+#if NDRAWBRIDGE < 1
+
 		/*
 		 * Note that the interface cannot be in promiscuous mode if there are
 		 * no BPF listeners. And if we are in promiscuous mode, we have to
@@ -746,6 +764,7 @@
 			m_freem(ipkt);
 			goto rx_another;
 		}
+#endif /* NDRAWBRIDGE < 1 */
 	}
 #endif
 	m_adj(ipkt, sizeof(struct ether_header));
diff -Nur --exclude=compile --exclude=*.orig --exclude=drawbr* --exclude=DRAWBRIDGE --exclude=newvers.sh /sys/i386/isa/if_fe.c sys/i386/isa/if_fe.c
--- /sys/i386/isa/if_fe.c	Sat Apr 18 18:25:11 1998
+++ sys/i386/isa/if_fe.c	Wed Dec  2 00:14:03 1998
@@ -121,6 +121,12 @@
 #include <net/bpfdesc.h>
 #endif
 
+#include "drawbridge.h"
+#if NDRAWBRIDGE > 0
+#include <net/drawbrdg.h>
+extern Statistics DBstats;
+#endif
+
 #include <machine/clock.h>
 
 #include <i386/isa/isa.h>
@@ -2676,13 +2682,23 @@
 
 	/* Allocate an mbuf with packet header info.  */
 	MGETHDR(m, M_DONTWAIT, MT_DATA);
+#if NDRAWBRIDGE > 0
+	if ( m == NULL ) {
+		DBstats.droppedNoMbufs++;
+		return -1;
+	}
+#else
 	if ( m == NULL ) return -1;
+#endif
 
 	/* Attach a cluster if this packet doesn't fit in a normal mbuf.  */
 	if ( len > MHLEN - NFS_MAGIC_OFFSET ) {
 		MCLGET( m, M_DONTWAIT );
 		if ( !( m->m_flags & M_EXT ) ) {
 			m_freem( m );
+#if NDRAWBRIDGE > 0
+			DBstats.droppedNoMbufs++;
+#endif
 			return -1;
 		}
 	}
@@ -2715,6 +2731,7 @@
 	}
 #endif
 
+#if NDRAWBRIDGE < 1
 	/*
 	 * Make sure this packet is (or may be) directed to us.
 	 * That is, the packet is either unicasted to our address,
@@ -2736,6 +2753,7 @@
 		m_freem( m );
 		return 0;
 	}
+#endif /* NDRAWBRIDGE */
 
 #if FE_DEBUG >= 3
 	if ( !ETHER_ADDR_IS_MULTICAST( eh->ether_dhost )
diff -Nur --exclude=compile --exclude=*.orig --exclude=drawbr* --exclude=DRAWBRIDGE --exclude=newvers.sh /sys/i386/isa/if_ie.c sys/i386/isa/if_ie.c
--- /sys/i386/isa/if_ie.c	Tue Jul  7 00:23:06 1998
+++ sys/i386/isa/if_ie.c	Wed Dec  2 00:14:03 1998
@@ -126,6 +126,11 @@
 #include <net/route.h>
 
 #include "bpfilter.h"
+#include "drawbridge.h"
+#if NDRAWBRIDGE > 0
+#include <net/drawbrdg.h>
+extern Statistics DBstats;
+#endif
 
 #ifdef INET
 #include <netinet/in.h>
@@ -1266,16 +1271,21 @@
    * This is only a consideration when FILTER is defined; i.e., when
    * we are either running BPF or doing multicasting.
    */
+#if NDRAWBRIDGE < 1  /* skip the check if running drawbridge */
   if(!check_eh(ie, ehp, to_bpf)) {
     ie_drop_packet_buffer(unit, ie);
     ie->arpcom.ac_if.if_ierrors--; /* just this case, it's not an error */
     return -1;
   }
+#endif
   totlen -= (offset = sizeof *ehp);
 
   MGETHDR(*mp, M_DONTWAIT, MT_DATA);
   if(!*mp) {
     ie_drop_packet_buffer(unit, ie);
+#if NDRAWBRIDGE > 0
+    DBstats.droppedNoMbufs++;
+#endif
     return -1;
   }
 
@@ -1303,6 +1313,9 @@
       MGET(m, M_DONTWAIT, MT_DATA);
       if(!m) {
 	m_freem(top);
+#if NDRAWBRIDGE > 0
+	DBstats.droppedNoMbufs++;
+#endif
 	ie_drop_packet_buffer(unit, ie);
 	return -1;
       }
@@ -1477,6 +1490,8 @@
     /* Pass it up */
     bpf_mtap(&ie->arpcom.ac_if, &m0);
   }
+  /* If Drawbridge is enabled, always pass the packet up... */
+#if NDRAWBRIDGE < 1
   /*
    * A signal passed up from the filtering code indicating that the
    * packet is intended for BPF but not for the protocol machinery.
@@ -1486,6 +1501,7 @@
     last_not_for_us = m;
     return;
   }
+#endif /* NDRAWBRIDGE < 1 */
 #endif /* NBPFILTER > 0 */
   /*
    * In here there used to be code to check destination addresses upon
diff -Nur --exclude=compile --exclude=*.orig --exclude=drawbr* --exclude=DRAWBRIDGE --exclude=newvers.sh /sys/i386/isa/if_le.c sys/i386/isa/if_le.c
--- /sys/i386/isa/if_le.c	Fri Sep  6 18:07:40 1996
+++ sys/i386/isa/if_le.c	Wed Dec  2 00:14:03 1998
@@ -56,6 +56,11 @@
 #include <net/route.h>
 
 #include "bpfilter.h"
+#include "drawbridge.h"
+#if NDRAWBRIDGE > 0
+#include <net/drawbrdg.h>
+extern Statistics DBstats;
+#endif
 
 #ifdef INET
 #include <netinet/in.h>
@@ -426,6 +431,10 @@
 #if NBPFILTER > 0
     if (sc->le_if.if_bpf != NULL && seg2 == NULL) {
 	bpf_tap(&sc->le_if, seg1, total_len);
+
+	/* I Drawbridge is enabled, always pass the packet up */
+#if NDRAWBRIDGE < 1
+
 	/*
 	 * If this is single cast but not to us
 	 * drop it!
@@ -444,6 +453,7 @@
 		return;
 	    }
 	}
+#endif /* NDRAWBRIDGE < 1 */
     }
 #endif
     seg1 += sizeof(eh); total_len -= sizeof(eh); len1 -= sizeof(eh);
@@ -451,6 +461,9 @@
     MGETHDR(m, M_DONTWAIT, MT_DATA);
     if (m == NULL) {
 	sc->le_if.if_ierrors++;
+#if NDRAWBRIDGE > 0
+	DBstats.droppedNoMbufs++;
+#endif
 	return;
     }
     m->m_pkthdr.len = total_len;
@@ -460,6 +473,9 @@
 	if ((m->m_flags & M_EXT) == 0) {
 	    m_free(m);
 	    sc->le_if.if_ierrors++;
+#if NDRAWBRIDGE > 0
+	    DBstats.droppedNoMbufs++;
+#endif
 	    return;
 	}
     } else if (total_len + LE_XTRA > MHLEN && MINCLSIZE == (MHLEN+MLEN)) {
@@ -467,6 +483,9 @@
 	if (m->m_next == NULL) {
 	    m_free(m);
 	    sc->le_if.if_ierrors++;
+#if NDRAWBRIDGE > 0
+	    DBstats.droppedNoMbufs++;
+#endif
 	    return;
 	}
 	m->m_next->m_len = total_len - MHLEN - LE_XTRA;
diff -Nur --exclude=compile --exclude=*.orig --exclude=drawbr* --exclude=DRAWBRIDGE --exclude=newvers.sh /sys/i386/isa/if_lnc.c sys/i386/isa/if_lnc.c
--- /sys/i386/isa/if_lnc.c	Mon Jul 20 12:41:38 1998
+++ sys/i386/isa/if_lnc.c	Wed Dec  2 00:14:03 1998
@@ -97,6 +97,12 @@
 #include <net/bpfdesc.h>
 #endif
 
+#include "drawbridge.h"
+#if NDRAWBRIDGE > 0
+#include <net/drawbrdg.h>
+extern Statistics DBstats;
+#endif
+
 #ifdef PC98
 #include <machine/clock.h>
 #endif
@@ -325,11 +331,21 @@
 		/* XXX m->m_data = m->m_ext.ext_buf;*/
 	} else {
 		MGET(m, M_DONTWAIT, MT_DATA);
+#if NDRAWBRIDGE > 0
+   	if (!m) {
+		DBstats.droppedNoMbufs++;
+		return(1);
+	}
+#else
    	if (!m)
 			return(1);
+#endif
       MCLGET(m, M_DONTWAIT);
    	if (!m->m_ext.ext_buf) {
 			m_free(m);
+#if NDRAWBRIDGE > 0
+			DBstats.droppedNoMbufs++;
+#endif
 			return(1);
 		}
 	}
@@ -391,6 +407,9 @@
 	MGETHDR(head, M_DONTWAIT, MT_DATA);
 	if (!head) {
 		LNCSTATS(drop_packet)
+#if NDRAWBRIDGE > 0
+		DBstats.droppedNoMbufs++;
+#endif
 		return(0);
 	}
 
@@ -421,6 +440,9 @@
 			MGET(m, M_DONTWAIT, MT_DATA);
 			if (!m) {
 				m_freem(head);
+#if NDRAWBRIDGE > 0
+				DBstats.droppedNoMbufs++;
+#endif
 				return(0);
 			}
 			if (pkt_len >= MINCLSIZE)
@@ -611,6 +633,8 @@
 				if (sc->arpcom.ac_if.if_bpf)
 					bpf_mtap(&sc->arpcom.ac_if, head);
 
+				/* If Drawbridge is enabled always pass the packet up */
+#if NDRAWBRIDGE < 1
 				/* Check this packet is really for us */
 
 				if ((sc->arpcom.ac_if.if_flags & IFF_PROMISC) &&
@@ -619,6 +643,7 @@
 							sizeof(eh->ether_dhost))))
 						m_freem(head);
 				else
+#endif /* NDRAWBRIDGE < 1 */
 #endif
 				{
 					/* Skip over the ether header */
@@ -1666,6 +1691,9 @@
 			if (no_entries_needed > (NDESC(sc->ntdre) - sc->pending_transmits))
 				if (!(head = chain_to_cluster(head))) {
 					log(LOG_ERR, "lnc%d: Couldn't get mbuf for transmit packet -- Resetting \n ",ifp->if_unit);
+#if NDRAWBRIDGE > 0
+					DBstats.droppedNoMbufs++;
+#endif
 					lnc_reset(sc);
 					return;
 				}
diff -Nur --exclude=compile --exclude=*.orig --exclude=drawbr* --exclude=DRAWBRIDGE --exclude=newvers.sh /sys/i386/isa/if_wl.c sys/i386/isa/if_wl.c
--- /sys/i386/isa/if_wl.c	Mon Aug 25 17:34:25 1997
+++ sys/i386/isa/if_wl.c	Wed Dec  2 00:14:03 1998
@@ -191,6 +191,11 @@
 #include "wl.h"
 #include "opt_wavelan.h"
 #include "bpfilter.h"
+#include "drawbridge.h"
+#if NDRAWBRIDGE > 0
+#include <net/drawbrdg.h>
+extern Statistics DBstats;
+#endif
 
 #include <sys/param.h>
 #include <sys/systm.h>
@@ -1001,6 +1006,9 @@
 	    CMD(unit);		/* turn off interrupts */
 	    printf("wl%d read(): hwrst trouble.\n", unit);
 	}
+#if NDRAWBRIDGE > 0
+	DBstats.droppedNoMbufs++;
+#endif
 	return 0;
     }
     m->m_next = (struct mbuf *) 0;
@@ -1021,6 +1029,9 @@
     	    CMD(unit);		/* turn off interrupts */
     	    printf("wl%d read(): hwrst trouble.\n", unit);
     	}
+#if NDRAWBRIDGE > 0
+	DBstats.droppedNoMbufs++;
+#endif
     	return 0;
     }
 
@@ -1051,6 +1062,9 @@
 		    CMD(unit);  /* turn off interrupts */
 		    printf("wl%d read(): hwrst trouble.\n", unit);
 		}
+#if NDRAWBRIDGE > 0
+		DBstats.droppedNoMbufs++;
+#endif
 		return 0;
 	    }
 	    mlen = 0;
@@ -1116,6 +1130,8 @@
 
 	bpf_mtap(ifp, &m0);
 	
+	/* If Drawbridge is enabled, always pass the packet up */
+#if NDRAWBRIDGE < 1
 	/*
 	 * point of this code is that even though we are in promiscuous
 	 * mode, and due to fact that bpf got packet already, we
@@ -1132,6 +1148,7 @@
 	    m_freem(m);
 	    return 1;
 	}
+#endif /* NDRAWBRIDGE < 1 */
     }
 #endif
 
diff -Nur --exclude=compile --exclude=*.orig --exclude=drawbr* --exclude=DRAWBRIDGE --exclude=newvers.sh /sys/i386/isa/if_ze.c sys/i386/isa/if_ze.c
--- /sys/i386/isa/if_ze.c	Tue Jul  7 00:23:11 1998
+++ sys/i386/isa/if_ze.c	Wed Dec  2 00:14:03 1998
@@ -102,6 +102,12 @@
 #include <net/bpfdesc.h>
 #endif
 
+#include "drawbridge.h"
+#if NDRAWBRIDGE > 0
+#include <net/drawbrdg.h>
+extern Statistics DBstats;
+#endif
+
 #include <machine/clock.h>
 #include <machine/md_var.h>
 
@@ -865,7 +871,7 @@
 	for (i = 0; i < ETHER_ADDR_LEN; ++i)
 		outb(sc->nic_addr + ED_P1_PAR0 + i, sc->arpcom.ac_enaddr[i]);
 
-#if NBPFILTER > 0
+#if ((NBPFILTER > 0) || (NDRAWBRIDGE > 0))
 	/*
 	 * Initialize multicast address hashing registers to accept
 	 *	 all multicasts (only used when in promiscuous mode)
@@ -1428,7 +1434,7 @@
 		    	    ((ifp->if_flags & IFF_RUNNING) == 0))
 				ze_init(ifp->if_unit);
 		}
-#if NBPFILTER > 0
+#if ((NBPFILTER > 0) || (NDRAWBRIDGE > 0))
 		if (ifp->if_flags & IFF_PROMISC) {
 			/*
 			 * Set promiscuous mode on interface.
@@ -1520,6 +1526,8 @@
 	if (sc->arpcom.ac_if.if_bpf) {
 		bpf_mtap(&sc->arpcom.ac_if, head);
 
+		/* If Drawbridge is enabled, always pass the packet up */
+#if NDRAWBRIDGE < 1
 		/*
 		 * Note that the interface cannot be in promiscuous mode if
 		 * there are no BPF listeners.  And if we are in promiscuous
@@ -1536,6 +1544,7 @@
 			m_freem(head);
 			return;
 		}
+#endif /* NDRAWBRIDGE < 1 */
 	}
 #endif
 
@@ -1549,6 +1558,9 @@
 
 bad:	if (head)
 		m_freem(head);
+#if NDRAWBRIDGE > 0
+	DBstats.droppedNoMbufs++;
+#endif
 	return;
 }
 
diff -Nur --exclude=compile --exclude=*.orig --exclude=drawbr* --exclude=DRAWBRIDGE --exclude=newvers.sh /sys/i386/isa/if_zp.c sys/i386/isa/if_zp.c
--- /sys/i386/isa/if_zp.c	Wed Oct 29 18:38:21 1997
+++ sys/i386/isa/if_zp.c	Wed Dec  2 00:14:03 1998
@@ -114,6 +114,11 @@
 #include "zp.h"
 
 #include "bpfilter.h"
+#include "drawbridge.h"
+#if NDRAWBRIDGE > 0
+#include <net/drawbrdg.h>
+extern Statistics DBstats;
+#endif
 
 #include <sys/param.h>
 #if defined(__FreeBSD__)
@@ -970,6 +975,9 @@
 	if (sc->arpcom.ac_if.if_bpf) {
 		bpf_mtap(&sc->arpcom.ac_if, top);
 
+		/* If Drawbridge is enabled, always pass the packet up */
+#if NDRAWBRIDGE < 1
+
 		/* Note that the interface cannot be in promiscuous mode if
 		 * there are no BPF listeners.  And if we are in promiscuous
 		 * mode, we have to check if this packet is really ours. */
@@ -982,6 +990,7 @@
 			m_freem(top);
 			return;
 		}
+#endif /* NDRAWBRIDGE < 1 */
 	}
 #endif
 	m_adj(top, sizeof(struct ether_header));
@@ -992,6 +1001,9 @@
 	while (inw(BASE + EP_STATUS) & S_COMMAND_IN_PROGRESS);
 	if (top)
 		m_freem(top);
+#if NDRAWBRIDGE > 0
+	DBstats.droppedNoMbufs++;
+#endif
 
 }
 
diff -Nur --exclude=compile --exclude=*.orig --exclude=drawbr* --exclude=DRAWBRIDGE --exclude=newvers.sh /sys/net/if.h sys/net/if.h
--- /sys/net/if.h	Tue Jul  7 00:24:08 1998
+++ sys/net/if.h	Wed Dec  2 00:14:03 1998
@@ -292,7 +292,7 @@
 #endif
 #endif /* KERNEL */
 
-#define	IFQ_MAXLEN	50
+#define	IFQ_MAXLEN	400		/* changed 50 to 400 for drawbridge */
 #define	IFNET_SLOWHZ	1		/* granularity is 1 second */
 
 /*
diff -Nur --exclude=compile --exclude=*.orig --exclude=drawbr* --exclude=DRAWBRIDGE --exclude=newvers.sh /sys/net/if_ethersubr.c sys/net/if_ethersubr.c
--- /sys/net/if_ethersubr.c	Tue Oct 28 18:33:48 1997
+++ sys/net/if_ethersubr.c	Wed Dec  2 00:14:03 1998
@@ -89,6 +89,13 @@
 extern struct ifqueue pkintrq;
 #endif
 
+#include "drawbridge.h"
+#if NDRAWBRIDGE > 0
+#include <net/drawbrdg.h>
+extern Statistics DBstats;
+extern FilterConfig DBcfg;
+#endif
+
 #ifdef NETATALK
 #include <netatalk/at.h>
 #include <netatalk/at_var.h>
@@ -420,6 +427,65 @@
  	(void)memcpy(eh->ether_dhost, edst, sizeof (edst));
  	(void)memcpy(eh->ether_shost, ac->ac_enaddr,
 	    sizeof(eh->ether_shost));
+
+#if NDRAWBRIDGE > 0
+	/*
+	 * Lookup the destination of this packet in the bridge table to find
+	 * out which side of drawbridge it's on.  Perform the desired action
+	 * based on the destination and the listen configuration.
+	 */
+	switch (drawbridge_bridge_lookup((HardwareAddr *)edst, ifp)) {
+
+	/* Redirect to the inside interface */
+	case DB_INSIDE_IF: /* Redirect to inside interface */
+		ifp = DBcfg.in_ifp;
+		bcopy((caddr_t)&DBcfg.local_hwaddr,(caddr_t)eh->ether_shost,6);
+		break;
+
+	/* Redirect to the outside interface */
+	case DB_OUTSIDE_IF: /* Redirect to outside interface */
+		ifp = DBcfg.out_ifp;
+		bcopy((caddr_t)&DBcfg.local_hwaddr,(caddr_t)eh->ether_shost,6);
+		break;
+
+	/* Send out both interfaces */
+	case DB_BOTH_IF: {
+		register struct ifnet *ifp2;
+		register struct mbuf *mdup;
+
+		if ((mdup = m_copy(m, 0, (int)M_COPYALL))) {
+			ifp2 = (ifp == DBcfg.in_ifp) ? DBcfg.out_ifp :
+						       DBcfg.in_ifp;
+			bcopy((caddr_t)&DBcfg.local_hwaddr,
+			      (caddr_t)(mtod(mdup, struct ether_header *)->
+						ether_shost), 6);
+			s = splimp();
+			if (IF_QFULL(&ifp2->if_snd)) {
+				IF_DROP(&ifp2->if_snd);
+				splx(s);
+				m_freem(mdup);
+			} else {
+				IF_ENQUEUE(&ifp2->if_snd, mdup);
+				if ((ifp2->if_flags & IFF_OACTIVE) == 0)
+					(*ifp2->if_start)(ifp2);
+				splx(s);
+			}
+		}
+		break;
+	}
+
+	/* Discard this packet */
+	case DB_DROP_PKT:
+		m_freem(m);
+		return (error);
+		break;
+
+	/* Don't do anything special with this packet */
+	case DB_PROCESS_PKT:
+
+	}
+#endif
+
 	s = splimp();
 	/*
 	 * Queue message on interface, and start output if interface
@@ -468,6 +534,63 @@
 		return;
 	}
 	ifp->if_ibytes += m->m_pkthdr.len + sizeof (*eh);
+
+#if NDRAWBRIDGE > 0
+	/*
+	 * Find out what to do with the incoming packet
+	 */
+	switch (drawbridge_test_pkt(&ifp, eh, m)) {
+
+	/* Bridge this packet across to the other interface */
+	case DB_FORWARD_PKT:
+		/*
+		 * ifp now points to the other interface.
+		 * Make sure the other interface is up and running.
+		 */
+		if ((ifp->if_flags & IFF_UP) == 0) {
+			m_freem(m);
+			DBstats.droppedIfDown++;
+			return;
+		}
+		/* XXX This definately needs to be fixed because it's too
+		 *     big of an assumption to make and will not work for
+		 *     the if_wl.c and if_ie.c ethernet drivers...
+		 *
+		 * The driver has moved m_data to the first byte after the
+		 * header so readjust m_data to include the header again.
+		 */
+		m->m_pkthdr.len += sizeof(struct ether_header);
+		m->m_len += sizeof(struct ether_header);
+		m->m_data -= sizeof(struct ether_header);
+ 		/*
+  		 * Queue message on interface, and start output if interface
+  		 * not yet active.
+  		 */
+		s = splimp();
+		if (IF_QFULL(&ifp->if_snd)) {
+			splx(s);
+			m_freem(m);
+			DBstats.droppedIfQfull++;
+			return;
+		}
+		IF_ENQUEUE(&ifp->if_snd, m);
+		if ((ifp->if_flags & IFF_OACTIVE) == 0)
+			(*ifp->if_start)(ifp);
+		splx(s);
+		return;
+
+	/* Discard the packet according to the bridge table or a filter rule */
+	case DB_DROP_PKT:
+		m_freem(m);
+		return;
+
+	/* This packet is for us or drawbridge is not running */
+	/* so just continue normal processing of the packet   */
+	case DB_PROCESS_PKT:
+
+	}
+#endif
+
 	if (bcmp((caddr_t)etherbroadcastaddr, (caddr_t)eh->ether_dhost,
 	    sizeof(etherbroadcastaddr)) == 0)
 		m->m_flags |= M_BCAST;
@@ -475,6 +598,21 @@
 		m->m_flags |= M_MCAST;
 	if (m->m_flags & (M_BCAST|M_MCAST))
 		ifp->if_imcasts++;
+
+#if NDRAWBRIDGE > 0
+	/*
+	 * Drawbridge enables promiscuous mode so we need to add a check here
+	 * to discard any packets not addressed to us.  This check is usually
+	 * done in the driver but we disabled it so we would get to look at
+	 * all incoming packets.
+	 */
+        else if ((ifp->if_flags & IFF_PROMISC)
+            && bcmp(((struct arpcom *)ifp)->ac_enaddr, (caddr_t)eh->ether_dhost,
+                    sizeof(eh->ether_dhost)) != 0) {
+                m_freem(m);
+                return;
+	}
+#endif
 
 	ether_type = ntohs(eh->ether_type);
 
diff -Nur --exclude=compile --exclude=*.orig --exclude=drawbr* --exclude=DRAWBRIDGE --exclude=newvers.sh /sys/net/if_fddisubr.c sys/net/if_fddisubr.c
--- /sys/net/if_fddisubr.c	Wed Jun 24 03:59:36 1998
+++ sys/net/if_fddisubr.c	Wed Dec  2 00:14:03 1998
@@ -111,6 +111,13 @@
 
 #include "bpfilter.h"
 
+#include "drawbridge.h"
+#if NDRAWBRIDGE > 0
+#include <net/drawbrdg.h>
+extern Statistics DBstats;
+extern FilterConfig DBcfg;
+#endif
+
 #define senderr(e) { error = (e); goto bad;}
 
 /*
@@ -429,6 +436,65 @@
   queue_it:
  	(void)memcpy((caddr_t)fh->fddi_shost, (caddr_t)ac->ac_enaddr,
 	    sizeof(fh->fddi_shost));
+
+#if NDRAWBRIDGE > 0
+	/*
+	 * Lookup the destination of this packet in the bridge table to find
+	 * out which side of drawbridge it's on.  Perform the desired action
+	 * based on the destination and the listen configuration.
+	 */
+	switch (drawbridge_bridge_lookup((HardwareAddr *)edst, ifp)) {
+
+	/* Redirect to the inside interface */
+	case DB_INSIDE_IF:
+		ifp = DBcfg.in_ifp;
+		bcopy((caddr_t)&DBcfg.local_hwaddr,(caddr_t)fh->fddi_shost,6);
+		break;
+
+	/* Redirect to the outside interface */
+	case DB_OUTSIDE_IF:
+		ifp = DBcfg.out_ifp;
+		bcopy((caddr_t)&DBcfg.local_hwaddr,(caddr_t)fh->fddi_shost,6);
+		break;
+
+	/* Send out both interfaces */
+	case DB_BOTH_IF: {
+		register struct ifnet *ifp2;
+		register struct mbuf *mdup;
+
+		if ((mdup = m_copy(m, 0, (int)M_COPYALL))) {
+			ifp2 = (ifp == DBcfg.in_ifp) ? DBcfg.out_ifp :
+						       DBcfg.in_ifp;
+			bcopy((caddr_t)&DBcfg.local_hwaddr,
+			      (caddr_t)(mtod(mdup, struct fddi_header *)->
+						fddi_shost), 6);
+			s = splimp();
+			if (IF_QFULL(&ifp2->if_snd)) {
+				IF_DROP(&ifp->if_snd);
+				splx(s);
+				m_freem(mdup);
+			} else {
+				IF_ENQUEUE(&ifp2->if_snd, mdup);
+				if ((ifp2->if_flags & IFF_OACTIVE) == 0)
+					(*ifp2->if_start)(ifp2);
+				splx(s);
+			}
+		}
+		break;
+	}
+
+	/* Discard this packet */
+	case DB_DROP_PKT:
+		m_freem(m);
+		return (error);
+		break;
+
+	/* Don't do anything special with this packet */
+	case DB_PROCESS_PKT:
+
+	}
+#endif
+
 	s = splimp();
 	/*
 	 * Queue message on interface, and start output if interface
@@ -475,6 +541,63 @@
 	}
 	ifp->if_lastchange = time;
 	ifp->if_ibytes += m->m_pkthdr.len + sizeof (*fh);
+
+#if NDRAWBRIDGE > 0
+	/*
+	 * Find out what to do with the incoming packet
+	 */
+	switch (drawbridge_test_pkt(&ifp, fh, m)) {
+
+	/* Bridge this packet across to the other interface */
+	case DB_FORWARD_PKT:
+		/*
+		 * ifp now points to the other interface.
+		 * Make sure the other interface is up and running.
+		 */
+		if ((ifp->if_flags & IFF_UP) == 0) {
+			m_freem(m);
+			DBstats.droppedIfDown++;
+			return;
+		}
+		/* XXX This definately needs to be fixed because it's too 
+		 *     big of an assumption to make.
+		 *
+		 * The driver has moved m_data to the first byte after the
+		 * header so readjust m_data to include the header again.
+		 */
+		m->m_pkthdr.len += sizeof(struct fddi_header);
+		m->m_len += sizeof(struct fddi_header);
+		m->m_data -= sizeof(struct fddi_header);
+		/*
+		 * Queue message on interface, and start output if interface
+		 * not yet active.
+		 */
+		s = splimp();
+		if (IF_QFULL(&ifp->if_snd)) {
+			splx(s);
+			m_free(m);
+			DBstats.droppedIfQfull++;
+			return;
+		}
+		IF_ENQUEUE(&ifp->if_snd, m);
+		if ((ifp->if_flags & IFF_OACTIVE) == 0)
+			(*ifp->if_start)(ifp);
+		splx(s);
+		return;
+
+	/* Discard the packet according to the bridge table or a filter rule */
+	case DB_DROP_PKT:
+		/* filter (discard) the packet */
+		m_freem(m);
+		return;
+
+	/* This packet is for us or drawbridge is not running */
+	/* so just continue normal processing of the packet   */
+	case DB_PROCESS_PKT:
+
+        }
+#endif
+
 	if (fh->fddi_dhost[0] & 1) {
 		if (bcmp((caddr_t)fddibroadcastaddr, (caddr_t)fh->fddi_dhost,
 		    sizeof(fddibroadcastaddr)) == 0)
diff -Nur --exclude=compile --exclude=*.orig --exclude=drawbr* --exclude=DRAWBRIDGE --exclude=newvers.sh /sys/pci/if_de.c sys/pci/if_de.c
--- /sys/pci/if_de.c	Sat Oct 25 09:33:16 1997
+++ sys/pci/if_de.c	Wed Dec  2 00:14:03 1998
@@ -76,6 +76,12 @@
 #include <dev/mii/miivar.h>
 #endif
 
+#include "drawbridge.h"
+#if NDRAWBRIDGE > 0
+#include <net/drawbrdg.h>
+extern Statistics DBstats;
+#endif
+
 #include "bpfilter.h"
 #if NBPFILTER > 0
 #include <net/bpf.h>
@@ -3316,7 +3322,18 @@
 	 * descriptors to process.
  	 */
 	if (eop == ri->ri_nextout)
+#if NDRAWBRIDGE < 1
+	    break;
+#else
+	{
+	    /*
+	     * The card has run out of available receive descriptors.
+	     * (This driver uses mbufs as descriptors)
+	     */
+	    DBstats.droppedNoMbufs++;
 	    break;
+	}
+#endif
 	    
 	/*
 	 * 90% of the packets will fit in one descriptor.  So we optimize
@@ -3394,10 +3411,17 @@
 		    TULIP_BPF_MTAP(sc, ms);
 #endif
 	    sc->tulip_flags |= TULIP_RXACT;
+	    /*
+	     * When Drawbridge is configured, do not discard the packet if
+	     * it doesn't have our MAC address.  This check is now done
+	     * in if_ethersubr after the drawbridge code.
+	     */
+#if NDRAWBRIDGE < 1
 	    if ((sc->tulip_flags & (TULIP_PROMISC|TULIP_HASHONLY))
 		    && (eh.ether_dhost[0] & 1) == 0
 		    && !TULIP_ADDREQUAL(eh.ether_dhost, sc->tulip_enaddr))
 		    goto next;
+#endif
 	    accept = 1;
 	    total_len -= sizeof(struct ether_header);
 	} else {
diff -Nur --exclude=compile --exclude=*.orig --exclude=drawbr* --exclude=DRAWBRIDGE --exclude=newvers.sh /sys/pci/if_fxp.c sys/pci/if_fxp.c
--- /sys/pci/if_fxp.c	Tue Jul  7 00:24:18 1998
+++ sys/pci/if_fxp.c	Wed Dec  2 00:14:03 1998
@@ -61,6 +61,12 @@
 #include <net/bpf.h>
 #endif
 
+#include "drawbridge.h"
+#if NDRAWBRIDGE > 0
+#include <net/drawbrdg.h>
+extern Statistics DBstats;
+#endif
+
 #if defined(__NetBSD__)
 
 #include <sys/ioctl.h>
@@ -833,6 +839,9 @@
 		MGETHDR(mn, M_DONTWAIT, MT_DATA);
 		if (mn == NULL) {
 			m_freem(mb_head);
+#if NDRAWBRIDGE > 0
+			DBstats.droppedNoMbufs++;
+#endif
 			return;
 		}
 		if (mb_head->m_pkthdr.len > MHLEN) {
@@ -840,6 +849,9 @@
 			if ((mn->m_flags & M_EXT) == 0) {
 				m_freem(mn);
 				m_freem(mb_head);
+#if NDRAWBRIDGE > 0
+				DBstats.droppedNoMbufs++;
+#endif
 				return;
 			}
 		}
@@ -964,6 +976,9 @@
 					if (total_len <
 					    sizeof(struct ether_header)) {
 						m_freem(m);
+#if NDRAWBRIDGE > 0
+						DBstats.droppedNoMbufs++;
+#endif
 						goto rcvloop;
 					}
 					m->m_pkthdr.rcvif = ifp;
@@ -977,6 +992,11 @@
 						    mtod(m, caddr_t),
 						    total_len); 
 						/*
+						 * If Drawbridge is enabled,
+						 * always pass the packet up
+						 */
+#if NDRAWBRIDGE < 1
+						/*
 						 * Only pass this packet up
 						 * if it is for us.
 						 */
@@ -989,12 +1009,17 @@
 							m_freem(m);
 							goto rcvloop;
 						}
+#endif /* NDRAWBRIDGE < 1 */
 					}
 #endif /* NBPFILTER > 0 */
 					m->m_data +=
 					    sizeof(struct ether_header);
 					ether_input(ifp, eh, m);
 				}
+#if NDRAWBRIDGE > 0
+				else
+					DBstats.droppedNoMbufs++;
+#endif
 				goto rcvloop;
 			}
 			if (statack & FXP_SCB_STATACK_RNR) {
diff -Nur --exclude=compile --exclude=*.orig --exclude=drawbr* --exclude=DRAWBRIDGE --exclude=newvers.sh /sys/pci/if_tx.c sys/pci/if_tx.c
--- /sys/pci/if_tx.c	Tue Jul  7 00:24:21 1998
+++ sys/pci/if_tx.c	Wed Dec  2 00:17:42 1998
@@ -84,6 +84,12 @@
 #include <net/bpfdesc.h>
 #endif
 
+#include "drawbridge.h"
+#if NDRAWBRIDGE > 0 
+#include <net/drawbrdg.h>
+extern Statistics DBstats;
+#endif      
+
 /*
  * Global variables
  */
@@ -345,6 +351,9 @@
 		if( NULL == m0 ) {
 			printf("tx%d: cannot allocate mbuf header\n",sc->unit);
 			sc->epic_if.if_ierrors++;
+#if NDRAWBRIDGE > 0
+			DBstats.droppedNoMbufs++;
+#endif     
 			goto rxerror;
 		}
 		MCLGET(m0,M_DONTWAIT);
@@ -352,6 +361,9 @@
 			printf("tx%d: cannot allocate mbuf cluster\n",sc->unit);
 			m_freem(m0);
 			sc->epic_if.if_ierrors++;
+#if NDRAWBRIDGE > 0
+			DBstats.droppedNoMbufs++;
+#endif     
 			goto rxerror;
 		}
 
@@ -367,6 +379,9 @@
 		if( NULL == m ){
 			printf("tx%d: cannot allocate mbuf header\n",sc->unit);
 			sc->epic_if.if_ierrors++;
+#if NDRAWBRIDGE > 0
+			DBstats.droppedNoMbufs++;
+#endif     
 			goto rxerror;
 		}
 		if( len > MHLEN ){
@@ -376,6 +391,9 @@
 					sc->unit);
 				m_freem( m );
 				sc->epic_if.if_ierrors++;
+#if NDRAWBRIDGE > 0
+				DBstats.droppedNoMbufs++;
+#endif     
 				goto rxerror;
 			}
 		}	
@@ -395,12 +413,14 @@
 		/* Give mbuf to BPFILTER */
 		if( sc->epic_if.if_bpf ) bpf_mtap( &sc->epic_if, m );
 
+#if NDRAWBRIDGE < 1
 		/* Accept only our packets, broadcasts and multicasts */
 		if( (eh->ether_dhost[0] & 1) == 0 &&
 		    bcmp(eh->ether_dhost,sc->epic_ac.ac_enaddr,ETHER_ADDR_LEN)){
 			m_freem(m);
 			goto rxerror;
 		}
+#endif /* NDRAWBRIDGE < 1 */
 #endif
 
 		/* Second mbuf holds packet ifself */
@@ -610,7 +630,14 @@
 
 		/* Update if Rx statistics */
 		if (status & (INTSTAT_OVW | INTSTAT_RXE))
+#if NDRAWBRIDGE > 0
+		{
+			DBstats.droppedNoMbufs++;
+#endif
 			sc->epic_if.if_ierrors++;
+#if NDRAWBRIDGE > 0
+		}
+#endif
 
 		/* Tx FIFO underflow. */
 		if (status & INTSTAT_TXU) {
