Age | Commit message (Collapse) | Author | Files | Lines |
|
If user has disabled dnsproxy with -r option, then fallback to
user specified nameservers instead of using the Google one.
|
|
The listener_table can be NULL if we have started connman with -r
option. Because we return < 0 value to caller in this case,
the caller, e.g. the tethering code, has a possibility to change
its functionality, e.g. the tethering code can fall back to some
other DNS servers.
|
|
If the user has enabled persistent tethering mode in main.conf, then
try to activate tethering when technology is re-enabled, or we are
returning from offline mode, or after the device has rebooted.
|
|
|
|
|
|
|
|
The __connman_technology_add_interface() needs to be called
after we have created the technology which is done by rtnl->newlink()
callback. If this is done the old way, the ethernet devices
will not get their interfaces set properly.
|
|
|
|
|
|
|
|
After splitting the input string into components, create a new array holding
the non-zero substrings as input for the commands. Thus the input can start
and end as well as divide its separate parts by any number spaces.
|
|
Add completion support for connmanctl commands.
|
|
Follow coding style and use __connmanctl prefix for the commands() function.
|
|
Add tethering support. For WiFi also set the SSID and passphrase if they
have been specified on the command line. Check that setting both SSID and
passphrase succeed before trying to enable tethering.
After successfully setting SSID and passphrase for WiFi, use the boolean
value parsing helper function return value to decide whether WiFi tethering
is to be enabled, disabled or not modified.
Fixes BMC#25886
|
|
The UID is fetched via org.freedesktop.DBus.GetConnectionUnixUser D-Bus
method call.
|
|
The helper struct will be used by a new dbus function which uses
a different callback signature. Therefore, we need to use a
void pointer for storing the callback.
|
|
Do not handle the small alloc failures because glib will abort
when memory is tight anyway.
|
|
Streamline the callback typedefs with the rest of the code.
|
|
Use the generic callback helpers to encapsulate struct create_data.
In a later patch we will add some more data elemets to struct
create_data. That is the reason why it is not remove here.
|
|
When a file is added (not modified) we need to parse it as well
|
|
We should not unref the policy on parsing errors becase the policy
lifetime is attached to the lifetime of the file. When the file
is removed we remove it from the hash table.
|
|
Match all is expressed via CONNMAN_SERVICE_TYPE_UNKNOWN. An empty
list means no match.
|
|
Use connman_sessoin_set_default_config() instead of open coded
version.
This prepars the next fix.
|
|
Match all is expressed via CONNMAN_SERVICE_TYPE_UNKNOWN. An empty
list means no match.
|
|
Make sure we never try to cleanup when the hash table has
been destroyed. In this case all resources have been
freed already.
|
|
By calling __connman_session_cleanup() before __connman_plugin_cleanup()
we make sure all resources allocated can released in the correct order.
The code assumes after an successful allocation, free will always work
and therefore we double free allocated memory.
|
|
Per MEEGO-25999 <https://bugs.meego.com/show_bug.cgi?id=25999>, there
exists a race between scan_callback and wifi_disable such that a care-
fully-timed deassertion of the technology Powered property between
throw_wifi_scan and scan_callback will lead to a device reference
count underflow. A second Powered property false -> true -> false
transition will then deallocate the device and Wi-Fi will no longer
function until connman or the system is restarted.
This patch improves upon and revises the prior patch to address this
issue by recognizing that hidden networks involve a slightly different
code path and timing and that both this and the prior case can be
addressed by tracking the device scanning state and only releasing the
device when the state is asserted.
|
|
Rename the dnsproxy file as it is more of a test tool than a unit test.
|
|
|
|
This is related to fix d7d8f8bdb7c1ddae098893e10608fcb42034a9ff
We did not set the state to idle after disconnecting the
associating service.
Fixes BMC#25981
|
|
Per MEEGO-25999 <https://bugs.meego.com/show_bug.cgi?id=25999>, there
exists a race between scan_callback and wifi_disable such that a care-
fully-timed deassertion of the technology Powered property between
throw_wifi_scan and scan_callback will lead to a device reference
count underflow. A second Powered property false -> true -> false
transition will then deallocate the device and Wi-Fi will no longer
function until connman or the system is restarted.
This patch addresses that race by tracking and observing the disabling
state such that scan_callback ad wifi_disable can effectively negotiate
which has performed the device release, thereby avoiding the double
release and resulting underflow.
|
|
|
|
|
|
In case a property did not appear by the time proxy_added was called
property_changed has to be called if it appear latter otherwise the
application will be unaware of it.
|
|
g_atomic_* end up using G_STATIC_ASSERT, causing gcc 4.8 to yell due to
-Wunused-local-typedefs.
gdbus/client.c: In function ‘g_dbus_client_ref’:
/usr/include/glib-2.0/glib/gmacros.h:162:53: error: typedef ‘_GStaticAssertCompileTimeAssertion_2’ locally defined but not used [-Werror=unused-local-typedefs]
#define G_STATIC_ASSERT(expr) typedef char G_PASTE (_GStaticAssertCompileTimeAssertion_, __COUNTER__)[(expr) ? 1 : -1]
|
|
The host ip address field is only used if user has given vpn
server as a host name instead of host ip address.
|
|
Possible memory leak here as we might have ip address allocated
already.
|
|
We must copy the response buffer before fixing the packet length.
Otherwise the packet length will go wrong if the request contained
EDNS0 data.
|
|
|
|
|
|
We were not handling client sent partial TCP messages correctly.
This meant that ConnMan would block if the client using TCP would
not send full DNS request.
When a new TCP client connects in tcp_listener_event(), a new
TCP channel is created to handle a partial client message if
all of the message is not already available. The partial TCP
message is patched together in tcp_client_event(). When all of
the TCP message has been received, the message is processed in
read_tcp_data(). The client has to send the DNS request within two
seconds before the connection is closed by ConnMan.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
We add IPv6 loopback address to resolv.conf if we have created
an IPv6 listening socket to port 53. Also remove ::1 from resolv.conf
when deleting the proxy.
|
|
Do not bind to ANY address so that other DNS server applications
can be used on the same host for interfaces that are not managed
by ConnMan. This means that we only create DNS listeners on loopback
and tethering interfaces.
|