DragonFly submit List (threaded) for 2005-03
[
Date Prev][
Date Next]
[
Thread Prev][
Thread Next]
[
Date Index][
Thread Index]
bridge(4) as a loadable module.
Hello,
Attached is a patch to treat bridge(4) as a loadable module and not as a
compile time kernel option. This fixes the following problem.
Bug:
ARP requests on bridged interfaces are not processed correctly when
loading bridge(4) as a module.
How to repeat:
Load bridge(4) as a module and bridge two interfaces (fxp0, fxp1).
Assign an IP address to fxp0. This IP address is inaccessible to devices
attached to fxp1. Adding static ARP entries resolves the problem.
Regards
Gary
diff -ruN /usr/src.old/sys/dev/netif/snc/if_snc.c /usr/src/sys/dev/netif/snc/if_snc.c
--- /usr/src.old/sys/dev/netif/snc/if_snc.c 2005-02-19 15:47:44.000000000 +0000
+++ /usr/src/sys/dev/netif/snc/if_snc.c 2005-03-21 11:42:38.000000000 +0000
@@ -58,9 +58,7 @@
#include <net/bpf.h>
#include "opt_bdg.h"
-#ifdef BRIDGE
#include <net/bridge/bridge.h>
-#endif
#include "dp83932reg.h"
#include "dp83932var.h"
diff -ruN /usr/src.old/sys/netinet/if_ether.c /usr/src/sys/netinet/if_ether.c
--- /usr/src.old/sys/netinet/if_ether.c 2005-03-04 03:48:25.000000000 +0000
+++ /usr/src/sys/netinet/if_ether.c 2005-03-21 11:47:31.000000000 +0000
@@ -113,10 +113,8 @@
#include <net/route.h>
#include <net/netisr.h>
#include <net/if_llc.h>
-#ifdef BRIDGE
#include <net/ethernet.h>
#include <net/bridge/bridge.h>
-#endif
#include <netinet/in.h>
#include <netinet/in_var.h>
@@ -628,11 +626,9 @@
op = ntohs(ah->ar_op);
memcpy(&isaddr, ar_spa(ah), sizeof isaddr);
memcpy(&itaddr, ar_tpa(ah), sizeof itaddr);
-#ifdef BRIDGE
+
#define BRIDGE_TEST (do_bridge)
-#else
-#define BRIDGE_TEST (0) /* cc will optimise the test away */
-#endif
+
/*
* For a bridge, we want to check the address irrespective
* of the receive interface. (This will change slightly
[
Date Prev][
Date Next]
[
Thread Prev][
Thread Next]
[
Date Index][
Thread Index]