summaryrefslogtreecommitdiff
path: root/src/ipconfig.c
AgeCommit message (Collapse)AuthorFilesLines
2012-09-28ipconfig: Fix IPv6.Configuration parsingTomasz Bursztyka1-5/+3
PrefixLength is exposed as a byte in the API, but code was waiting for a string when setting a new value.
2012-09-25ipconfig: Set default IPv6 method according to kernel IPv6 supportJukka Rissanen1-2/+10
If kernel does not support IPv6, then turn default ipconfig method OFF. If kernel supports IPv6, then the default is AUTO meaning that we try to send router solicitation messages.
2012-09-13ipconfig: Catch interface name changesJukka Rissanen1-1/+12
Update the ipdevice interface name if it is changed by udev.
2012-09-04Use g_slist_prepend() where appropriatePatrik Flykt1-1/+1
Convert usage of g_slist_append() to g_slist_prepend() where appropriate. gdbus, dnsproxy, resolver, rtnl, session and session unit test have ordering requirements and thus not touched.
2012-08-17ipconfig: Use correct ipconfig ipaddress for FIXED methodPatrik Flykt1-9/+5
Use ipconfig->address when reporting IP addresses for services with FIXED method. AUTO method is used only by IPv6, don't report any addresses should it erroneously appear for IPv4. Fixes BMC#25084
2012-08-14ipconfig: Allow NULL gateway for IPv6Elena Tebesoi1-3/+0
This patch makes possible configuring a GPRS connection with IPV6 settings and without gateway.
2012-08-08ipconfig: Add function to check if the ipconfig is OFFJukka Rissanen1-0/+19
2012-06-25ipconfig: Save prefixlen only if not clearedJulien Massot1-2/+3
This commit fixes a bug when using manual ipv4 addressing. The first time it works, but once the service is reconnected it uses an invalid netmask: 255.255.255.255.
2012-06-11ipconfig: Set IPv6 privacy default value from kernel defaultJukka Rissanen1-1/+5
Use value set in the kernel as the initial IPv6 privacy setting. This also allows distros to set the privacy value without needing to tweak connman.
2012-05-22ipconfig: Show FIXED configuration IP address infoPatrik Flykt1-12/+50
Show FIXED configuration IP address info in service IPv4 and IPv6 properties. If IP address is not available via ipconfig->system, use the provider configured ones instead. Fixes BMC#25084
2012-04-29core: Update copyright informationMarcel Holtmann1-1/+1
2012-04-27ipconfig: Add ipconfig type to __connman_ipconfig_get_gateway_from_index()Patrik Flykt1-11/+16
In order to be able to request a certain ipconfig type, add the type as a parameter to __connman_ipconfig_get_gateway_from_index().
2012-04-25ipconfig: Do not tweak IPv6 status of ignored devicesJukka Rissanen1-2/+4
2012-03-20ipconfig: Disable IPv6 for new interfacesDaniel Wagner1-0/+7
We don't have yet an ipconfig for this interface, that means the service.c does not yet know this interface. In order to be able to get into sync we disable IPv6 auto connection at this point. If the service state machine decides to connect, it will enable it again.
2012-03-20ipconfig: Track ipconfigs enabled/disabled stateDaniel Wagner1-0/+7
2012-03-20ipconfig: Do not enable IPv6 ipconfigs when loading the propertiesDaniel Wagner1-3/+0
When enabling IPv6 when loading the Service properties, the Service state machine gets out of sync when AutoConnect is disabled. At this point we should only load the properties and let the Service state machine decide when to enable the ipconfigs. And the good news is that the core handles this already.
2012-03-04ipconfig: Fix broken attempt to handle {IPv4,IPv6}.ConfigurationMarcel Holtmann1-45/+14
2012-03-01ipconfig: Accept variant types in __connman_ipconfig_set_config()Tim Sander1-0/+36
According the D-Bus API, the Service interface accepts variant types.
2012-02-13ippool: Add prefixlen argument to __connman_ippool_new/deladdr()Daniel Wagner1-4/+4
2012-02-01ipconfig: Add/del IP address from IP poolDaniel Wagner1-0/+6
2012-01-24ipconfig: Add caller information to ref/unref debug prints.Jukka Rissanen1-4/+9
2012-01-20ipconfig: Possible to have double unrefJukka Rissanen1-1/+1
Because we do not check that origin pointer is not this ipconfig, it is possible that we might try to unref the ipconfig one time too many. Something like this was seen in the log file: connmand[19208]: src/ipconfig.c:enable_ipv6() connmand[19208]: src/ipconfig.c:__connman_ipconfig_unref() ipconfig 0x47502f0 refcount 0 connmand[19208]: src/ipconfig.c:__connman_ipconfig_disable() ipconfig 0x47502f0 connmand[19208]: src/ipconfig.c:disable_ipv6() connmand[19208]: src/ipconfig.c:__connman_ipconfig_unref() ipconfig 0x47502f0 refcount -1
2012-01-13ipconfig: Rename previously public functionsDaniel Wagner1-21/+21
Prefix them with a "__".
2012-01-05dhcpv6: Allow address setting in IPv6 auto mode.Jukka Rissanen1-3/+3
The DHCPv6 is used when doing autoconfiguration so we must allow address setting/unsetting in auto mode.
2012-01-05ipconfig: Return IPv6 privacy status.Jukka Rissanen1-0/+8
2012-01-05ipconfig: Have separate callbacks for route changes.Jukka Rissanen1-4/+4
Route changes should not trigger ip_bound or ip_release callbacks in service.c as that can cause too early transition into IPv6 ready state. The ip_bound (in __connman_ipconfig_newaddr()) and ip_release (in __connman_ipconfig_deladdr()) are enough to trigger a transition in IPv6 state. This also prevents too many notifier calls in session as we only notify session when address changes.
2012-01-05ipconfig: Address list for duplicates does not need gateway info.Jukka Rissanen1-16/+0
The ipdevice address list is only used for detecting duplicate addresses so there is no need to copy the gateway information into the list. The same gateway data was actually used in every list element which is not a correct thing to do as there would be different gateways in IPv4 and IPv6 anyway.
2011-12-16ipconfig: Make IPv6 method AUTO by defaultJukka Rissanen1-2/+9
This is done so that if the method is not found in settings file, then we enable IPv6 by default.
2011-11-28ipconfig: Remove ipconfig from ipconfig_listJukka Rissanen1-1/+2
It is possible that ipdevice does not contain ipconfig for some reason. If that happens, then ipconfig is not removed from ipconfig_list which will then escalate into freed memory access when interface is taken down. The problem was seen with valgrind when tethering was enabled and then disabled for wifi.
2011-11-10core: Use gcc atomics instead glib's onesDaniel Wagner1-17/+16
g_atomic_int_exchange_and_add() has been removed from glib 2.30 and g_atomic_int_add() should be used. Though there are still quite a few distros out which do not ship a glib version with g_atomic_int_add(). Instead of maintaing a compatiblilty glib layer we just use the built-in functions for atomic memory access.
2011-10-21ipconfig: Set/unset IPv4 rp_filter settingJukka Rissanen1-0/+54
2011-10-07ipconfig: Show IPv4.Configuration properties for FIXEDPatrik Flykt1-1/+1
Show IPv4.Configuration properties also for CONNMAN_IPCONFIG_METHOD_FIXED configuration method. Fixes BMC#23444
2011-08-09ipconfig: Remember last DHCP IP address.Jukka Rissanen1-1/+39
2011-07-08ipconfig: Don't call IP bound ops when type does not matchSamuel Ortiz1-0/+34
2011-06-27ipconfig: Added function to enable IPv6.Jukka Rissanen1-0/+8
2011-06-27ipconfig: Add function to remove address from interface.Jukka Rissanen1-2/+28
The new function removes the address from interface but does not touch internal data structures.
2011-06-27connection: Separate IPv4 and IPv6 gateway and routing handling.Jukka Rissanen1-9/+9
2011-06-16element: Remove element.cDaniel Wagner1-0/+1
2011-05-31ipconfig: Add Function to Stringify ipconfig TypeGrant Erickson1-0/+14
2011-04-17ipconfig: Check for NULL pointers before calling inet_pton on themSamuel Ortiz1-0/+3
2011-04-17ipconfig: Fix connman_ipaddress_set_ipv6 prototypeSamuel Ortiz1-3/+4
Switch the gateway and prefix_length order to be consistent with the ipv4 version.
2011-03-25service: Return 6to4 tunnel status to dbus caller.Jukka Rissanen1-1/+8
2011-03-22ipconfig: Clear ipconfig address when removing itSamuel Ortiz1-2/+10
2011-03-02ipconfig: Catch IPv6 default route creation and deletion.Jukka Rissanen1-6/+10
2011-02-25service: Add a generic ipconfig selection routineSamuel Ortiz1-2/+2
2011-02-25ipconfig: Remove __connman_ipconfig_set_element_ipv6_gatewaySamuel Ortiz1-8/+0
This routine is unused.
2011-02-25ipconfig: Remove connman_ipconfig_bindSamuel Ortiz1-19/+0
This routine is unused.
2011-02-24ipconfig: IPv4 gateway can be NULLSamuel Ortiz1-1/+1
For point to point interfaces, our IPv4 gateway will be NULL.
2011-02-23ipconfig: Split ipconfig_set_gateway()Samuel Ortiz1-15/+35
ipconfig_set_gateway() sets the gateway pointer while gateway_add() sets the route.
2011-02-23ipconfig: Rename ipconfig_set/clear_address routinesSamuel Ortiz1-6/+6