forked from pfsense/FreeBSD-src
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
MF22... add bridging support to the device drivers. Without this
bridging cannot work on -current/releng3!
- Loading branch information
Luigi Rizzo
authored and
Luigi Rizzo
committed
Mar 17, 1999
1 parent
dfce77f
commit ab090e5
Showing
8 changed files
with
306 additions
and
74 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
/* $NetBSD: if_de.c,v 1.82 1999/02/28 17:08:51 explorer Exp $ */ | ||
/* $Id: if_de.c,v 1.100 1999/03/13 09:21:27 peter Exp $ */ | ||
/* $Id: if_de.c,v 1.101 1999/03/14 08:32:52 peter Exp $ */ | ||
|
||
/*- | ||
* Copyright (c) 1994-1997 Matt Thomas ([email protected]) | ||
|
@@ -124,6 +124,10 @@ | |
#include <pci/dc21040reg.h> | ||
#define DEVAR_INCLUDE "pci/if_devar.h" | ||
#endif | ||
#include "opt_bdg.h" | ||
#ifdef BRIDGE | ||
#include <net/bridge.h> | ||
#endif | ||
#endif /* __FreeBSD__ */ | ||
|
||
#if defined(__bsdi__) | ||
|
@@ -3544,6 +3548,23 @@ tulip_rx_intr( | |
} | ||
#endif | ||
sc->tulip_flags |= TULIP_RXACT; | ||
|
||
#ifdef BRIDGE /* see code in if_ed.c */ | ||
ms->m_pkthdr.rcvif = ifp; /* XXX */ | ||
ms->m_pkthdr.len = total_len; /* XXX */ | ||
if (do_bridge) { | ||
struct ifnet *bdg_ifp ; | ||
bdg_ifp = bridge_in(ms); | ||
if (bdg_ifp == BDG_DROP) | ||
goto next ; /* and drop */ | ||
if (bdg_ifp != BDG_LOCAL) | ||
bdg_forward(&ms, bdg_ifp); | ||
if (bdg_ifp != BDG_LOCAL && bdg_ifp != BDG_BCAST && | ||
bdg_ifp != BDG_MCAST) | ||
goto next ; /* and drop */ | ||
/* all others accepted locally */ | ||
} else | ||
#endif | ||
if ((sc->tulip_flags & (TULIP_PROMISC|TULIP_HASHONLY)) | ||
&& (eh.ether_dhost[0] & 1) == 0 | ||
&& !TULIP_ADDREQUAL(eh.ether_dhost, sc->tulip_enaddr)) | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.