Date: Mon, 21 Jun 1999 23:48:16 -0500 (CDT) From: easton@mia.net To: FreeBSD-gnats-submit@freebsd.org Subject: kern/12335: if_pn.c lacks bridging support; patch enclosed to add it Message-ID: <199906220448.XAA00913@traffic-shaper.mia.net>
index | next in thread | raw e-mail
>Number: 12335
>Category: kern
>Synopsis: if_pn.c lacks bridging support; patch enclosed to add it
>Confidential: no
>Severity: non-critical
>Priority: low
>Responsible: freebsd-bugs
>State: open
>Quarter:
>Keywords:
>Date-Required:
>Class: sw-bug
>Submitter-Id: current-users
>Arrival-Date: Mon Jun 21 21:50:00 PDT 1999
>Closed-Date:
>Last-Modified:
>Originator: Josh Easton
>Release: FreeBSD 3.1-RELEASE i386
>Organization:
Maria's Internet Access
>Environment:
All versions of FreeBSD (including -current)
>Description:
if_pn.c has never had bridging support added to it. Fix attached
>How-To-Repeat:
Any attempts to enable bridging fail
>Fix:
Patch to 3.1-RELEASE:
--- if_pn.c Mon Jun 21 03:34:49 1999
+++ if_pn.c.bridging Mon Jun 21 23:22:24 1999
@@ -77,6 +77,10 @@
#include <net/bpf.h>
#endif
+#ifdef BRIDGE
+#include <net/bridge.h>
+#endif
+
#include <vm/vm.h> /* for vtophys */
#include <vm/pmap.h> /* for vtophys */
#include <machine/clock.h> /* for DELAY */
@@ -1325,11 +1329,26 @@
}
}
#endif
- /* Remove header from mbuf and pass it on. */
+
+#ifdef BRIDGE
+ m->m_pkthdr.rcvif = ifp;
+ m->m_pkthdr.len = total_len;
+ if (do_bridge) {
+ struct ifnet *bdg_ifp;
+ bdg_ifp = bridge_in(m);
+ if (bdg_ifp == BDG_DROP)
+ return;
+ if (bdg_ifp != BDG_LOCAL)
+ bdg_forward(&m, bdg_ifp);
+ if (bdg_ifp != BDG_LOCAL && bdg_ifp != BDG_BCAST &&
+ bdg_ifp != BDG_MCAST)
+ return;
+ }
+#endif
+ /* Remove header from mbuf and pass it on. */
m_adj(m, sizeof(struct ether_header));
ether_input(ifp, eh, m);
}
-
return;
}
>Release-Note:
>Audit-Trail:
>Unformatted:
To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-bugs" in the body of the message
help
Want to link to this message? Use this
URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199906220448.XAA00913>
