Skip to content

Commit

Permalink
Ignoring various special devices when generating host config.
Browse files Browse the repository at this point in the history
  • Loading branch information
lhartung committed Sep 3, 2015
1 parent d969345 commit 5f4bd83
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
6 changes: 6 additions & 0 deletions paradrop/paradrop/lib/config/devices.py
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,12 @@ def detectSystemDevices():
if isVirtual(ifname):
continue

# More special cases to ignore for now.
if ifname.startswith("br"):
continue
if ifname.startswith("docker"):
continue

dev = {"name": ifname}

if isWAN(ifname):
Expand Down
2 changes: 1 addition & 1 deletion tests/paradrop/test_lib_config.py
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ def mockListDir(path):
Generate fake results for os.listdir
"""
if path == "/sys/class/net":
return ["lo", "eth0", "eth1", "wlan0", "vethabcdef"]
return ["lo", "eth0", "eth1", "wlan0", "vethabcdef", "br-lan", "docker0"]
else:
return os.listdir(path)

Expand Down

0 comments on commit 5f4bd83

Please sign in to comment.