Date: Fri, 17 Sep 1999 11:57:01 -0600 From: lyndon@orthanc.ab.ca To: freebsd-current@freebsd.org Subject: Patch to add bridging to vr Ethernet driver Message-ID: <199909171757.LAA60380@orthanc.ab.ca>
next in thread | raw e-mail | index | archive | help
Could someone *please* review and commit this patch to /sys/pci/if_vr.c?
I've been trying since June to get this into the source tree. If/when
this goes in you can close kern/12385. Thanks.
--lyndon
--- /sys/pci/if_vr.c Fri Aug 27 18:50:59 1999
+++ if_vr.c Mon Sep 6 21:57:43 1999
@@ -79,6 +79,11 @@
#include <net/bpf.h>
#endif
+#include "opt_bdg.h"
+#ifdef BRIDGE
+#include <net/bridge.h>
+#endif /* BRIDGE */
+
#include <vm/vm.h> /* for vtophys */
#include <vm/pmap.h> /* for vtophys */
#include <machine/clock.h> /* for DELAY */
@@ -1415,7 +1420,21 @@
continue;
}
}
-#endif
+#endif /* NBPF>0 */
+#ifdef BRIDGE
+ if (do_bridge) {
+ struct ifnet *bdg_ifp;
+ bdg_ifp = bridge_in(m);
+ if (bdg_ifp != BDG_LOCAL && bdg_ifp != BDG_DROP)
+ bdg_forward(&m, bdg_ifp);
+ if (((bdg_ifp != BDG_LOCAL) && (bdg_ifp != BDG_BCAST) &&
+ (bdg_ifp != BDG_MCAST)) || bdg_ifp == BDG_DROP) {
+ m_freem(m);
+ continue;
+ }
+ }
+#endif /* BRIDGE */
+
/* Remove header from mbuf and pass it on. */
m_adj(m, sizeof(struct ether_header));
ether_input(ifp, eh, m);
To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-current" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199909171757.LAA60380>
