summaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2013-03-22dnsproxy: Make sure we are not accessing null hashJukka Rissanen1-0/+6
If dnsproxy is not in use, like when connman has been started with -r option, then the listener_table will be NULL which can cause crash in hash table lookup call.
2013-03-19iptables-unit: Check if rules are inserted/removedDaniel Wagner3-1/+118
Optionally use iptables-save to check if the rules are installed or removed on the system instead of relying only on the returned iptables error code. Do notice that running tools/iptables-unit will modify and delete existing iptables firewall rules on your system. Use iptables-unit with caution!
2013-03-19build: Run ippool test during make distcheckDaniel Wagner1-9/+7
test-ippool is a pure unit test can therefore be part of the distcheck target.
2013-03-19test-ippool: Update unit test printoutsDaniel Wagner1-8/+8
2013-03-18neard: RequestOOB() method sends empty dictionaryTomasz Bursztyka1-4/+8
Reported by Ravikumar Veeramally
2013-03-18iptables: Allocated memory blocks are already zerod outDaniel Wagner1-4/+0
entry_head and entry_return are allocated via g_try_malloc0().
2013-03-18iptables: Factor out duplicated update hook codeDaniel Wagner1-33/+27
After removing one or more rules the builtin hooks need to be updated accordingly. iptables_flush_chain() and iptables_delete_rule() share a common code part.
2013-03-18iptables: Fix invalid access to list after removing first ruleDaniel Wagner1-6/+16
The list pointer is invalid after remove_table_entry(). Since we entering the 'if' body only for the first rule in a builtin chain we can safely update list to point to the next element.
2013-03-18iptables: Rename pre_load_table() to get_table()Daniel Wagner1-12/+10
The second argument is not used anymore, let's remove it. The funciton name doesn't really match to its implementation, so it's also time to rename it.
2013-03-18iptables: Improve debug log outputDaniel Wagner1-4/+17
We need to see a bit more in detail what happens when CONNMAN_IPTABLES_DEBUG is not set, for example the removing/flushing during bootup. Also remove the DBG() from parse_rule_spec() because all callers already have a DBG(). So not much additional information here.
2013-03-18iptables: Lookup in table hash before module loadingDaniel Wagner1-10/+14
pre_load_table() is called always with table == NULL, we end up keep trying to load the kernel modules even though the table is already loaded. Therefore, move the lookup one level up.
2013-03-18iptables: Use glib function for string operationsDaniel Wagner1-31/+31
Streamline this file with the rest of ConnMan's code base.
2013-03-18iptables: Drop support for xtables < 1.4.11Daniel Wagner2-72/+1
The API changed between 1.4.10 (version code 5) and 1.4.11 (version code 6) and we needed to workaround with a bunch of ugly ifdefs. 1.4.11 was released on 26.05.2011 and even Debian testing ships 1.4.14 these days.
2013-03-18iptables-unit: Add debug optionDaniel Wagner1-1/+40
It is impossible to see the normal unit test output with all DBG() enabled by default.
2013-03-18iptables-test: Use iptables implementation from coreDaniel Wagner2-1812/+85
With the recent changes to iptables.c and the new API iptables-test.c and iptables.c started to diverge and it is not really possible to keep those two files in sync. Instead we start using the new API. Unfortunatly, we need to partially parse argv and concatinate the rest again together. This is ugly but not much we can do about it.
2013-03-18iptables: Add __connman_iptables_dump()Daniel Wagner2-0/+16
In order to allow our test tool iptables-tests to dump a table we need an dump function. The only user will be this tool. That allows the linker to remove this code, so no additional code size.
2013-03-18build: Ignore iptables-unit and session-test in tools directoryDaniel Wagner1-2/+2
2013-03-18test-session: Move file to tools and rename it to session-testDaniel Wagner6-10/+9
These tests depens on ConnMan running and therefore not really a unit tests. Let's move it to tools.
2013-03-18test-iptables: Move file to tools and rename it to iptables-unitDaniel Wagner2-5/+5
Unit tests are suppessed to be run during 'make distcheck' but iptables-unit needs to be run with root rights.
2013-03-14doc: Information about activating debugging in ConnManJukka Rissanen1-0/+43
2013-03-14service: User cannot modify immutable serviceJukka Rissanen1-0/+15
If the service is provisioned via .config file, then user is only able to set the AutoConnect status of the service. All the other settings must be set from the .config file. Fixes BMC#25984
2013-03-08vpn: Make sure vpn connection really exists before removing itJukka Rissanen1-1/+6
2013-03-08vpn: Check whether we have already removed the providerJukka Rissanen1-0/+8
The dbus messages from vpnd might come in different order so make sure we are not trying to access already removed provider.
2013-03-08vpn: Add debug information when vpn state changesJukka Rissanen1-0/+2
2013-03-08vpn: Remove VPN provider from service list when destroying itJukka Rissanen1-1/+1
When provider is destroyed in vpnd, we get a notification about that. We must then remove the provider which will also unref it so the provider data will get removed properly. Old code just unreffed the provider but it was left hanging in service list.
2013-03-08provider: New provider removal function callable from vpn pluginJukka Rissanen2-0/+14
2013-03-08provider: Change the name of provider remove functionJukka Rissanen3-3/+3
Following patch will introduce provider remove function that can be used from vpn plugin so rename the current removal function to reflect better its usage.
2013-03-08vpn-config: Ignore IN_CREATE as IN_MODIFY is called anywayJukka Rissanen1-8/+20
Inotify will send modify event after create event when user has copied the config file into config directory. Because of this it is useless to act on create event. As a bonus we avoid create/modify/create loop that was earlier done in the modify event handling code.
2013-03-08vpn: Clear the data pointer from provider when destroyingJukka Rissanen1-0/+2
If the data pointer is left around, then vpn plugin might accidentally use it if dbus messages are received after we have cleared the vpn connection.
2013-03-08vpn-provider: Do not save or load provisioned VPN connectionsJukka Rissanen1-3/+13
The vpnd will not read or save provider data from disk. Only way to provision VPN is by setting necessary data in VPN .config file.
2013-03-08vpn-provider: SetProperty and ClearProperty do not work if immutableJukka Rissanen1-0/+6
Immutable VPN connection settings cannot be changed by SetProperty or ClearProperty dbus API.
2013-03-08vpn-provider: Introduce immutable flag to provider dataJukka Rissanen1-0/+5
2013-03-08vpn-provider: Do not allow changes to settings that are immutableJukka Rissanen2-5/+26
The immutable settings are those that are read from .config file.
2013-03-08service: Send signal only if immutable flag value changesJukka Rissanen1-0/+4
2013-03-08vpn: Set immutable flag of the VPN serviceJukka Rissanen1-0/+1
2013-03-08provider: Function to set the immutable flagJukka Rissanen2-0/+15
2013-03-08vpn: Remember the immutable flag from vpndJukka Rissanen1-0/+3
2013-03-08test: Pretty print the error when trying to set/unset VPN propertyJukka Rissanen1-2/+8
2013-03-08doc: Describe immutable flag for VPN connectionJukka Rissanen1-0/+8
The immutable flag is set if the VPN connection is provisioned via a .config file. The VPN connection can be removed only by removing the .config file from /var/lib/connman-vpn directory.
2013-03-08vpn-provider: Do not quit vpnd if there are no VPN configurationsJukka Rissanen3-27/+0
Because we now support provisioning of VPN services via .config file, we need to keep vpnd running so that it can monitor the connman-vpn directory for new config files.
2013-03-08doc: Typo fixes in the documentationJukka Rissanen3-4/+4
Fixes BMC#25978
2013-03-07device: Check positive device filter correctlyJukka Rissanen1-4/+10
The -i or --device command line option contains the device names that we should use. Unfortunately the check fails if there are multiple interfaces in that list and we ignore the interfaces instead. Fixes BMC#25979
2013-03-07iptables: Fix rule appendingDaniel Wagner1-9/+6
Commit ba052f1f "iptables: Add split out iptables commands" introduced a bug. __connman_iptables_append() should call iptables_append_rule() instead of iptables_insert_rule().
2013-03-07iptables: Valid policies are only ACCEPT and DROPDaniel Wagner1-1/+6
2013-03-07iptables: Fix setting policyDaniel Wagner1-1/+6
The policy is kept at the end of the chain not at the beginning. Currently, the code assumes that the builtin chain is empty.
2013-03-07iptables: Always update options tableDaniel Wagner1-4/+0
The linked list is tracking all loading modules. Since we do not unload once they are loaded (xtables does not support this), we might up leaving prepare_matches() before we update the option table. Since we carefully reset the global xtable state after executing one rule, this check is wrong, e.g. if we add to similar rules (same matches (mark, nfacct)). In this case the second rule would not be parsed correctly. Nasty nasty iptables parser!
2013-03-07iptables: Do not flush in the wrong orderDaniel Wagner1-0/+8
2013-03-07iptables: Fix and refactor iterate_entries()Daniel Wagner1-25/+46
Updating the builtin and hook index is more complex then one would expect. In order to be able to update them correctly we need also to pass in the underflow table to the iterate function. To improve the readability the valid_hook magic has been moved into next_hook_entry_index() which does exactly as the name says.
2013-03-07iptables: Fix is_fallthrough() checkDaniel Wagner1-2/+6
A fallthrough rule is one which has the default target name, does not have a verdict and is not a jump rule. is_fallthrough() is called excluslive from the insert path, thus the value of verdict will be 0 for a fallthrough rule.
2013-03-06build: vpn-property test script was missing from buildJukka Rissanen1-1/+1