Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(924)

Unified Diff: server/site_linux_router.py

Issue 5689002: Start bridge before running hostapd (Closed) Base URL: http://git.chromium.org/git/autotest.git@master
Patch Set: Created 10 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: server/site_linux_router.py
diff --git a/server/site_linux_router.py b/server/site_linux_router.py
index fbd9e0be22d6c822207fe431f513926a59c780a8..70707fc2e3fd86684d16d83bfe18b2f38c48fc58 100644
--- a/server/site_linux_router.py
+++ b/server/site_linux_router.py
@@ -279,6 +279,15 @@ class LinuxRouter(object):
(self.hostapd['file'], '\n'.join(
"%s=%s" % kv for kv in conf.iteritems())))
+ if not multi_interface:
+ logging.info("Initializing bridge...")
+ self.router.run("%s addbr %s" %
+ (self.cmd_brctl, self.bridgeif))
+ self.router.run("%s setfd %s %d" %
+ (self.cmd_brctl, self.bridgeif, 0))
+ self.router.run("%s stp %s %d" %
+ (self.cmd_brctl, self.bridgeif, 0))
+
# Run hostapd.
logging.info("Starting hostapd...")
self.router.run("%s -B %s" %
@@ -286,10 +295,8 @@ class LinuxRouter(object):
# Set up the bridge.
- logging.info("Setting up the bridge...")
if not multi_interface:
- self.router.run("%s setfd %s %d" %
- (self.cmd_brctl, self.bridgeif, 0))
+ logging.info("Setting up the bridge...")
self.router.run("%s addif %s %s" %
(self.cmd_brctl, self.bridgeif, self.wiredif))
self.router.run("%s link set %s up" %
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698