OSEC

Neohapsis is currently accepting applications for employment. For more information, please visit our website www.neohapsis.com or email hr@neohapsis.com
 
Subject: Re: bridge config and transparent firewall
From: Antonio Messina (ninnicsai.unipa.it)
Date: Mon Feb 14 2000 - 08:34:33 CST


I've looked at the rl driver source code and there is no code
for bridging. But with the following patch it now works.

Jim Flowers wrote:
>
> Nope, worked fine for me with a couple of the 8029s using the ed driver.
> I wonder if the list was just what Luigi had confirmed and not necessarily
> restrictive. Could be the rl driver though I thought the only impact on
> the interface driver was to put it in promiscuous mode to listen to all
> packets and pass them up.
>
> Do you have DUMMYNET compiled in? Seems to me there was a dependency.
>
> Jim Flowers <jflowersezo.net>
> #4 ISP on C|NET, #1 in Ohio
>
> On Mon, 14 Feb 2000, Antonio Messina wrote:
>
> > Jim Flowers wrote:
> > >
> > > try man bridge. it's very straightforward.
> > >
> >
> > of course i've done that...
> > but now i'm reading again the "bugs" section of the man page.
> > it says: "Not all interface support bridging -- at the moment it
> > works for 'ed', 'de', 'ep', 'fe', 'fxp', 'lnc', 'mx', 'tx' and
> > 'xl' interfaces."
> > I think bridging doesn't work for me because i'm using an 'ed'
> > ne2000 pci Realtek 8029 and a 'rl' Realtek 8139 (not supported ?!?).
> >
>
> To Unsubscribe: send mail to majordomoFreeBSD.org
> with "unsubscribe freebsd-security" in the body of the message

*** if_rl.c.orig Mon Feb 14 09:19:35 2000
--- if_rl.c Mon Feb 14 09:40:22 2000
***************
*** 103,108 ****
--- 103,115 ----
  #include <net/bpf.h>
  #endif
  
+ /* BRIDGING ?? */
+ #include "opt_bdg.h"
+ #ifdef BRIDGE
+ #include <net/if_types.h>
+ #include <net/bridge.h>
+ #endif
+
  #include <vm/vm.h> /* for vtophys */
  #include <vm/pmap.h> /* for vtophys */
  #include <machine/clock.h> /* for DELAY */
***************
*** 1432,1437 ****
--- 1439,1465 ----
                          }
                  }
  #endif
+
+ /* BRIDGING ??? */
+ #ifdef BRIDGE
+ if (do_bridge) {
+ struct ifnet *bdg_ifp;
+ bdg_ifp = bridge_in(m);
+ if (bdg_ifp == BDG_DROP) {
+ m_freem(m);
+ return;
+ }
+ if (bdg_ifp != BDG_LOCAL)
+ bdg_forward(&m, bdg_ifp);
+ if (bdg_ifp != BDG_LOCAL &&
+ bdg_ifp != BDG_BCAST &&
+ bdg_ifp != BDG_MCAST) {
+ m_freem(m);
+ return;
+ }
+ }
+ #endif
+
                  /* 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 majordomoFreeBSD.org
with "unsubscribe freebsd-security" in the body of the message