Quick_Start_Guide_for_Bridge(1).pdf
(
144 KB
)
Pobierz
Quick Start Guide for starting Soft-AP or station in bridge mode
(A) How to add bridge:
# The command creates a new instance of the Ethernet bridge
brctl addbr br0
# The command will make the interface wlan0 a port of the bridge br0. This means
that all frames received on wlan0 will be processed as if destined for the bridge.
brctl addif br0 wlan0
# You may get the error message “can't add wlan0 to bridge br0: Operation not
supported” when the driver uses CFG80211, the Linux kernel version is greater than
2.5.35.1 and the wlan0 interface is not AP mode. You can modify kernel to remove
the limitation of cfg80211 module and below is a modification sample of
linux-3.10.63.
--- D: /linux-3.10.63/net/ wireless/util.c
+++ D: /linux-3.10.63/net/ wireless/util.c
@@ -815,11 +815,11 @@
return -EOPNOTSUPP;
/* if it's part of a bridge, reject changing type to station/ibss */
if ((dev->priv_flags & IFF_BRIDGE_PORT) &&
/*if ((dev->priv_flags & IFF_BRIDGE_PORT) &&
(ntype == NL80211_IFTYPE_ADHOC ||
ntype == NL80211_IFTYPE_STATION ||
ntype == NL80211_IFTYPE_P2P_CLIENT))
return -EBUSY;
return -EBUSY;*/
-
+
-
+
if (ntype != otype && netif_running(dev)) {
mutex_lock(&rdev->devlist_mtx);
@@ -870,7 +870,7 @@
/* fall through */
case NL80211_IFTYPE_P2P_CLIENT:
case NL80211_IFTYPE_ADHOC:
-
dev->priv_flags |= IFF_DONT_BRIDGE;
+
//dev->priv_flags |= IFF_DONT_BRIDGE;
break;
case NL80211_IFTYPE_P2P_GO:
case NL80211_IFTYPE_AP:
--- D: /linux-3.10.63/net/wireless/core.c
+++ D: /linux-3.10.63/net/wireless/core.c
@@ -948,10 +948,10 @@
netdev_set_default_ethtool_ops(dev, &cfg80211_ethtool_ops);
-
+
if ((wdev->iftype == NL80211_IFTYPE_STATION ||
/*if ((wdev->iftype == NL80211_IFTYPE_STATION ||
wdev->iftype == NL80211_IFTYPE_P2P_CLIENT ||
wdev->iftype == NL80211_IFTYPE_ADHOC)
&& !wdev->use_4addr)
-
dev->priv_flags |= IFF_DONT_BRIDGE;
+
dev->priv_flags |= IFF_DONT_BRIDGE;*/
break;
case NETDEV_GOING_DOWN:
cfg80211_leave(rdev, wdev);
# The command will make the interface eth0 a port of the bridge br0.
brctl addif br0 eth0
# The command sets the bridge's “bridge forward delay” to zero seconds
brctl setfd br0 0
(B) Soft-AP in bridge mode:
(1) Add an additional configuration parameter, bridge, in the rtl_hostapd.conf file
bridge=br0
(2) The others are the same with normal Soft-AP mode. Please reference
“Quick_Start_Guide_for_SoftAP.pdf” to get complete information.
(C) The station in bridge mode:
(1) start wpa_supplicant daemon with bridge name to replace one without bridge
name in the background
wpa_supplicant -Dwext -iwlan0 -c /tmp/net/wpa.conf -b br0 -B
(2) The wpa_supplicant may receive EAPOL packet fail in Linux kernel 3.9.1 ~ 4.0.5.
You still can modify kernel to remove the limitation of bridge module and below
is a modification sample of linux-3.10.63.
--- D: /linux-3.10.63/net/bridge/br_if.c
+++ D: /linux-3.10.63/net/bridge/br_if.c
@@ -75,7 +75,7 @@
return;
spin_lock_bh(&br->lock);
if (netif_running(dev) && netif_oper_up(dev)) {
if (netif_running(dev)) {
if (p->state == BR_STATE_DISABLED)
-
+
br_stp_enable_port(p);
} else {
@@ -387,7 +387,7 @@
spin_lock_bh(&br->lock);
changed_addr = br_stp_recalculate_bridge_id(br);
-
+
if (netif_running(dev) && netif_oper_up(dev) &&
if (netif_running(dev) &&
(br->dev->flags & IFF_UP))
br_stp_enable_port(p);
spin_unlock_bh(&br->lock);
--- D: /linux-3.10.63/net/bridge/br_notify.c
+++ D: /linux-3.10.63/net/bridge/br_notify.c
@@ -82,7 +82,7 @@
break;
case NETDEV_UP:
if (netif_running(br->dev) && netif_oper_up(dev)) {
if (netif_running(br->dev)) {
spin_lock_bh(&br->lock);
br_stp_enable_port(p);
spin_unlock_bh(&br->lock);
-
+
--- D: /linux-3.10.63/net/bridge/br_stp_if.c
+++ D: /linux-3.10.63/net/bridge/br_stp_if.c
@@ -54,7 +54,7 @@
br_config_bpdu_generation(br);
list_for_each_entry(p, &br->port_list, list) {
if (netif_running(p->dev) && netif_oper_up(p->dev))
if (netif_running(p->dev))
br_stp_enable_port(p);
}
-
+
(3) The others are the same with normal station mode. Please reference
“wpa_cli_with_wpa_supplicant.pdf” to get complete information.
(D) The bridge br0 may include multiple ports. Suggest set IP address at br0.
(1) Static ip address
ifconfig br0 192.168.0.1
(2) DHCP get ip address from DHCP server
dhclient br0
(E) How to recompile and reinstall cfg80211 and bridge module:
#recompile cfg80211 module
make clean -C /usr/src/linux-3.10.63 SUBDIRS=/usr/src/linux-3.10.63/net/wireless/
modules
#reinstall cfg80211 module
rmmod cfg80211.ko
insmod /usr/src/linux-3.10.63/net/wireless/cfg80211.ko
#recompile bridge module
make clean -C /usr/src/linux-3.10.63 SUBDIRS=/usr/src/linux-3.10.63/net/bridge/
modules
#reinstall cfg80211 module
rmmod bridge.ko
insmod /usr/src/linux-3.10.63/net/bridge/bridge.ko
Plik z chomika:
hacyy
Inne pliki z tego folderu:
Office Professional Plus 2019.zip
(3355391 KB)
Worms Armageddon [WINDOWS 10] SPOLSZCZENIE [PL].7z
(533047 KB)
Wireshark-win32-3.6.5.exe
(59869 KB)
OCCT.exe
(84407 KB)
LibreOffice_7.3.3_Win_x64.msi
(339680 KB)
Inne foldery tego chomika:
AsProgrammer
BOOTICE_2016.06.17_v1.3.4.0
CH341A - USB Programmer v1.30_PL
CH341A Programmer v1.4
Diagnostyka BMW
Zgłoś jeśli
naruszono regulamin