Merge lp:~morphis/aethercast/mii-box-fixes into lp:aethercast

Proposed by Simon Fels
Status: Merged
Approved by: Simon Fels
Approved revision: 154
Merged at revision: 153
Proposed branch: lp:~morphis/aethercast/mii-box-fixes
Merge into: lp:aethercast
Diff against target: 99 lines (+22/-6)
7 files modified
conf/CMakeLists.txt (+3/-0)
conf/dhclient-hook-p2p (+10/-0)
debian/aethercast.install (+1/-0)
src/ac/dbus/controllerskeleton.cpp (+2/-2)
src/w11tng/dhcpclient.cpp (+2/-2)
src/w11tng/filemonitor.cpp (+1/-1)
src/w11tng/networkmanager.cpp (+3/-1)
To merge this branch: bzr merge lp:~morphis/aethercast/mii-box-fixes
Reviewer Review Type Date Requested Status
Matteo Croce (community) Approve
Konrad Zapałowicz (community) code Approve
Review via email: mp+300066@code.launchpad.net

Commit message

Fix several issues which prevent the Mii Box from connecting

* Set GO intent to 0 to always act as group client
* Add a hook for dhclient to prevent default routes being added for p2p devices
* Fix file monitor to react on any file change as the changes-done event from glib is not reliable

The changes above will mostly like make other devices work too.

To post a comment you must log in.
Revision history for this message
Konrad Zapałowicz (kzapalowicz) wrote :

LGTM

review: Approve (code)
lp:~morphis/aethercast/mii-box-fixes updated
154. By Simon Fels

Print debug scan message only when we're successfully scanning

Revision history for this message
Matteo Croce (teknoraver) :
review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'conf/CMakeLists.txt'
2--- conf/CMakeLists.txt 2016-01-17 13:40:52 +0000
3+++ conf/CMakeLists.txt 2016-07-14 13:38:50 +0000
4@@ -8,3 +8,6 @@
5
6 install(FILES ${CMAKE_CURRENT_SOURCE_DIR}/dhcpd.conf
7 DESTINATION /etc/aethercast/)
8+
9+install(FILES ${CMAKE_CURRENT_SOURCE_DIR}/dhclient-hook-p2p
10+ DESTINATION /etc/dhcp/dhclient-enter-hooks.d/aethercast-p2p)
11
12=== added file 'conf/dhclient-hook-p2p'
13--- conf/dhclient-hook-p2p 1970-01-01 00:00:00 +0000
14+++ conf/dhclient-hook-p2p 2016-07-14 13:38:50 +0000
15@@ -0,0 +1,10 @@
16+case ${interface} in
17+ p2p*)
18+ # Prevent any default routes being applied for p2p network devices. We
19+ # don't need a default route for those as we just connect to specific
20+ # peers in those networks and nothing else.
21+ unset new_routers
22+ ;;
23+ *)
24+ ;;
25+esac
26
27=== modified file 'debian/aethercast.install'
28--- debian/aethercast.install 2016-02-29 12:05:03 +0000
29+++ debian/aethercast.install 2016-07-14 13:38:50 +0000
30@@ -4,3 +4,4 @@
31 etc/init/aethercast.conf
32 etc/aethercast/dhcpd.conf
33 etc/dbus-1/system.d/aethercast-dbus.conf
34+etc/dhcp/dhclient-enter-hooks.d/aethercast-p2p
35
36=== modified file 'src/ac/dbus/controllerskeleton.cpp'
37--- src/ac/dbus/controllerskeleton.cpp 2016-06-07 08:21:20 +0000
38+++ src/ac/dbus/controllerskeleton.cpp 2016-07-14 13:38:50 +0000
39@@ -219,8 +219,6 @@
40 return TRUE;
41 }
42
43- AC_INFO("Scanning for remote devices");
44-
45 const auto error = inst->Scan();
46 if (error != ac::Error::kNone) {
47 g_dbus_method_invocation_return_error(invocation, AETHERCAST_ERROR,
48@@ -228,6 +226,8 @@
49 return TRUE;
50 }
51
52+ AC_INFO("Scanning for remote devices");
53+
54 g_dbus_method_invocation_return_value(invocation, nullptr);
55
56 return TRUE;
57
58=== modified file 'src/w11tng/dhcpclient.cpp'
59--- src/w11tng/dhcpclient.cpp 2016-05-19 05:24:46 +0000
60+++ src/w11tng/dhcpclient.cpp 2016-07-14 13:38:50 +0000
61@@ -76,8 +76,8 @@
62 std::vector<std::string> argv = {
63 // Disable background on lease (let dhclient not fork)
64 "-d",
65- // Don't be verbose
66- "-q",
67+ // Be verbose and not quiet on startup
68+ "-v",
69 // Force us to be IPv4 no matter what the default is
70 "-4",
71 // Use the temporary lease file we used above to not interfere
72
73=== modified file 'src/w11tng/filemonitor.cpp'
74--- src/w11tng/filemonitor.cpp 2016-05-19 05:24:46 +0000
75+++ src/w11tng/filemonitor.cpp 2016-07-14 13:38:50 +0000
76@@ -65,7 +65,7 @@
77 if (not thiz)
78 return;
79
80- if (event_type != G_FILE_MONITOR_EVENT_CHANGES_DONE_HINT)
81+ if (event_type != G_FILE_MONITOR_EVENT_CHANGED)
82 return;
83
84 if (auto sp = thiz->delegate_.lock())
85
86=== modified file 'src/w11tng/networkmanager.cpp'
87--- src/w11tng/networkmanager.cpp 2016-05-19 05:24:46 +0000
88+++ src/w11tng/networkmanager.cpp 2016-07-14 13:38:50 +0000
89@@ -31,7 +31,9 @@
90 // We take two minutes as timeout here which corresponds to what wpa
91 // takes for the group formation.
92 static const std::chrono::seconds kConnectTimeout{120};
93-static constexpr std::int32_t kSourceGoIntent = 7;
94+// As we play the source role we don't intent to be the group owner
95+// and therefor use the lowest intent possible.
96+static constexpr std::int32_t kSourceGoIntent = 0;
97 }
98
99 namespace w11tng {

Subscribers

People subscribed via source and target branches

to all changes: