summaryrefslogtreecommitdiff
path: root/gdhcp/client.c
AgeCommit message (Collapse)AuthorFilesLines
2024-05-17Fix crash issue when sending DHCP_FAIL signalJaehyun Kim1-2/+7
Change-Id: I8b0dfe83c9ed9d1d7b2fc118f88af5e99d77234b Signed-off-by: Jaehyun Kim <jeik01.kim@samsung.com>
2023-03-15Merge tag 'upstream/1.41' into tizenAnjali Nijhara1-0/+5
Change-Id: I7e90773484901c50e61d243f97d916f5588da9c5
2023-03-15Imported Upstream version 1.41upstream/1.41Anjali Nijhara1-0/+5
Change-Id: Ida2a62a81c771f833353d1a9a77604e6f2b06b88
2023-01-11Add a dbus signal and a property for DHCP statusaccepted/tizen/7.0/unified/20230118.093741Jaehyun Kim1-0/+7
Signal for DHCP start point has been added. And the interface name is also delivered to distinguish devices. Change-Id: I30ac4a48309c5324efb66a36c9dd431e0c847f5e Signed-off-by: Jaehyun Kim <jeik01.kim@samsung.com>
2022-12-12DA: Modify DHCP request retries countaccepted/tizen/7.0/unified/20221216.024728Jaehyun Kim1-1/+2
Change-Id: Ib8a332412a954992d20d5f9db3fcd9d0f23eb9e4 Signed-off-by: Jaehyun Kim <jeik01.kim@samsung.com>
2022-02-23Merge tag 'upstream/1.40' into tizen.submit/tizen/20220224.061208Niraj Kumar Goit1-1/+1
Change-Id: I4ed89827d776db6eeec11878bc1cd0cd6c5e1e80 Signed-off-by: Niraj Kumar Goit <niraj.g@samsung.com> Signed-off-by: Anjali Nijhara <a.nijhara@samsung.com>
2022-02-15Imported Upstream version 1.40upstream/1.40Niraj Kumar Goit1-10/+12
Change-Id: Id3e405d088ee3fb19fd0ca049e1cb7f812b40fca Signed-off-by: Niraj Kumar Goit <niraj.g@samsung.com>
2021-12-16gdhcp: Avoid reading invalid data in dhcp_get_optionNiraj Kumar Goit1-9/+11
Reference: https://git.kernel.org/pub/scm/network/connman/connman.git/commit/?id=58d397ba74873384aee449690a9070bacd5676fa Change-Id: I44c6e1f0448ed8fb5b1955da6458fe67c8ff56cb Signed-off-by: Niraj Kumar Goit <niraj.g@samsung.com>
2021-01-04Imported Upstream connman version 1.38Niraj Kumar Goit1-2/+4
Change-Id: I9e650762f3b2b2a31945b66e044e67a77e3b4b12 Signed-off-by: Niraj Kumar Goit <niraj.g@samsung.com>
2020-10-14Imported Upstream version 1.38upstream/1.38Nishant Chaprana1-2/+4
Change-Id: I7cada2367329445e1d200055e21d96e7e9c05047 Signed-off-by: Nishant Chaprana <n.chaprana@samsung.com>
2020-10-12[gdhcp/client] Reopen socket GIO channel when failedNishant Chaprana1-0/+8
Change-Id: Ib63b6f194e67fc4d7cfc3f223afa064761dff578 Signed-off-by: Nishant Chaprana <n.chaprana@samsung.com>
2019-09-18Imported Upstream version 1.37submit/tizen/20190920.082459Nishant Chaprana1-77/+169
Change-Id: Idb47c1ddbedc9f97181b8e9a5eeac04ddd832a2c Signed-off-by: Nishant Chaprana <n.chaprana@samsung.com>
2019-07-04Imported Upstream version 1.37upstream/1.37Nishant Chaprana1-75/+102
Change-Id: Ib5957e7ee3a9315ee86a331189bc3e9e71751ee8 Signed-off-by: Nishant Chaprana <n.chaprana@samsung.com>
2018-01-23Updated connman to version 1.35Seonah Moon1-10/+10
Change-Id: I13526fbf80296a79be15548fc226a308941ac9ec Signed-off-by: Taesub Kim <taesub.kim@samsung.com>
2018-01-08Imported Upstream version 1.35upstream/1.35Seonah Moon1-15/+24
Change-Id: I174854914d9fd06a813270b57d1f7bc2bac63c6a Signed-off-by: Seonah Moon <seonah1.moon@samsung.com>
2017-08-03Changes required for DHCP leased seconds APIsubmit/tizen/20170809.085632submit/tizen/20170808.043745accepted/tizen/unified/20170811.021044Abhishek Sansanwal1-0/+12
Change-Id: I0727c24f30be5162d27e49996dfa376348f98527 Signed-off-by: Abhishek Sansanwal <abhishek.s94@samsung.com>
2017-04-06Provide DHCP Server address to upper layer while appending IPv4 Datataesub kim1-0/+4
Change-Id: I8d6a33ddeff94c7bbfb56ed7e4d64966be5bcd31 Signed-off-by: Taesub Kim <taesub.kim@samsung.com>
2017-03-30apply upstream fixessubmit/tizen/20170403.015738accepted/tizen/wearable/20170403.124441accepted/tizen/unified/20170403.124614accepted/tizen/tv/20170403.124414accepted/tizen/mobile/20170403.124303accepted/tizen/ivi/20170403.124556accepted/tizen/common/20170403.190030accepted/tizen_wearableaccepted/tizen_tvaccepted/tizen_mobileaccepted/tizen_iviaccepted/tizen_commonEun Chul Kim1-3/+6
- Replace g_timeout_add_seconds() with 0 as timeout to g_idle_add() - gdhcp: Set T1 and T2 to infinite if expiry time is infinite - dhcpv6: Return -EISCONN when the expiry time is inifinite Change-Id: I59ddd9b4c2d1af0f1ee8898381bc0372fba8e8ad
2017-03-28Modified the DHCP descover/request timeout and disable DHCP reququest for ↵taesub kim1-1/+54
last address (DHCP discovery) wlan0 retry timeout=1sec retries=15 (DHCP request) retry timeout=1sec Change-Id: I28b8f8361dcf2c8cff7f3084c47707f05bc0da64 Signed-off-by: Taesub Kim <taesub.kim@samsung.com>
2016-06-10[SPIN] Restart dhcp as soon as INIT-REBOOT has been failedNiraj Kumar Goit1-0/+49
desc: Start DHCPDISCOVERY when DHCPREQUEST of INIT-REBOOT has failed. Change-Id: I7c6de8a3b397765cd0173a5b18c0c926a5ce29a4 Signed-off-by: Niraj Kumar Goit <niraj.g@samsung.com>
2016-06-09Merge:Partial Fix a crash and valgrind invalid read errorManeesh Jain1-1/+1
Change-Id: Ib36cab79ea86048860ffda7d6108b769a3cc9b33 Signed-off-by: Maneesh Jain <maneesh.jain@samsung.com>
2016-04-26Imported Upstream version 1.29upstream/1.29taesubkim1-10/+23
Change-Id: I2958446c35966d9ed72df0120b80561be7d89f54 Signed-off-by: Taesub Kim <taesub.kim@samsung.com>
2016-03-30gdhcp: Don't try to remove timer againsubmit/tizen/20160406.101500accepted/tizen/wearable/20160407.000819accepted/tizen/tv/20160407.000800accepted/tizen/mobile/20160407.000743accepted/tizen/ivi/20160407.000831accepted/tizen/common/20160406.145254Saurav Babu1-0/+3
GLib-CRITICAL warning message is obtained in below scenario: 1. service is connected and link local address is obtained. 2. Try to disconnect service. (connmand:8377): GLib-CRITICAL **: Source ID 289 was not found when attempting to remove it (connmand:8377): GLib-CRITICAL **: Source ID 303 was not found when attempting to remove it When Link Local IP address is obtained then both dhcp_client->timeout assigned for DISCOVER_TIMEOUT and ANNOUNCE_INTERVAL are already removed when discover_timeout() and ipv4ll_announce_timeout() function returns FALSE but the dhcp_client->timeout is not assigned to 0. Now when dhcp_release() calls remove_timeouts() function then dhcp_client->timeout is tried to remove again resulting in GLib-CRITICAL warning. This patch removes all possible remaing timeouts in g_dhcp_client_start() and explicitly sets dhcp_client->timeout to 0 in ipv4ll_announce_timeout() function. Change-Id: I12b072beef92818a2c1db253c85d1cfea540682b Signed-off-by: Saurav Babu <saurav.babu@samsung.com>
2016-03-01gdhcp: Don't send DHCPREQUEST if last assigned IP is Link Local AddressSaurav Babu1-1/+2
In the following scenario: 1. ConnMan is connected to a service and Link Local Address is obtained. 2. Disconnect the service. 3. Connect the service again. ConnMan tries to send DHCPREQUEST with last assigned IP which was Link Local Address. This patch makes ConnMan to send DHCPDISCOVER when last assigned IP was Link Local Address. Change-Id: I3c03f2b43a0f5c5f3be0a4878decb4345af55b33 Signed-off-by: Saurav Babu <saurav.babu@samsung.com>
2015-08-07Base Code merged to SPIN 2.4submit/tizen/20150810.034432hyunuktak1-10/+33
Signed-off-by: hyunuktak <hyunuk.tak@samsung.com> Change-Id: I84a42375b5c59739e4caca1f726699ea7647ef17
2014-10-31Tethering: Add interface that save lease in DHCP informationChengyi Zhao1-65/+0
Change-Id: Ia09c875954d8a20a3e6c39f87076780d8a6582e4
2014-10-29Imported Upstream version 1.26upstream/1.26Zhang zhengguang1-15/+61
2014-07-17Imported Upstream version 1.24upstream/1.24Zhang zhengguang1-279/+684
2013-06-12dhcpv6: Send domain list option to serverJukka Rissanen1-0/+3
OPTION_DOMAIN_LIST(24) was not sent to server.
2013-05-15gdhcp: Handle dhcp_client->type == G_DHCP_IPV4LLJustin Maggard1-17/+17
Clean up several places where dhcp_client->type == G_DHCP_IPV4LL is unhandled.
2013-05-06dhcpv6: Implement CONFIRM message supportJukka Rissanen1-2/+68
See RFC 3315 Chapter 18.1.2. Creation and Transmission of Confirm Messages for details
2013-05-06gdhcp: Initialize message status code earlyJukka Rissanen1-4/+3
The message status code was initialized too late i.e., after it was set so we lost the status code. This problem was seen with wide-dhcpv6 server.
2013-04-30dhcpv6: Add elapsed time option to sent messagesJukka Rissanen1-3/+47
A mandatory elapsed time option was missing from the sent DHCPv6 messages. See RFC 3315 chapter 22.9 for details.
2013-04-26gdhcp: Do not change the transaction id if retransmittingJukka Rissanen1-3/+9
As requested in RFC 3315 chapter 15.1, a client MUST leave the transaction id unchanged in retransmissions of a message.
2013-04-26gdhcp: Add helper functions for message retransmissionJukka Rissanen1-0/+17
2013-04-26gdhcp: Add debug print for transaction idJukka Rissanen1-5/+12
Print transaction id of sent and received messages so that it is easier to match the packets.
2012-12-20gdhcp: Use glib memory functionsDaniel Wagner1-1/+1
Use for all memory allocation/dealocation operation the glib functions. This allows us to use g_mem_profile().
2012-12-04dhcpv6: Memory leak when sending Option Request OptionJukka Rissanen1-0/+2
2012-10-11gdhcp: Use data size specific option setting functionJukka Rissanen1-6/+7
Instead of using dhcp_add_simple_option() the gdhcp now uses three functions for setting uint8, uint16 and uint32 values.
2012-10-11gdhcp: Use host byte order internallyJukka Rissanen1-26/+21
Convert to network byte order just before sending the packet.
2012-07-17gdhcp: Set client state to INIT_SELECTING on restartForest Bond1-0/+1
With the previous behavior, we would end up sending a discover message and then ignoring the reply due to the client state mismatch, so a restart would never result in successful acquisition of a lease. RFC 2131 specifies that the client should return to INIT state in various restart scenarios. However, also note that it would not make sense in any case to send a discover message and ignore the reply.
2012-07-15gdhcp: Avoid shadowing address string variableMarcel Holtmann1-4/+4
2012-05-11gdhcp: Make sure we have the message before accessing itJukka Rissanen1-0/+3
2012-05-11gdhcp: Message type is required in DHCPv4Jukka Rissanen1-1/+4
2012-05-09gdhcp: Remove dead assignmentHenrique Dante de Almeida1-1/+1
2012-05-09gdhcp: Remove assignment that's never usedHenrique Dante de Almeida1-1/+0
2012-05-04gdhcp: Add option and length checksPatrik Flykt1-0/+6
2012-04-29gdhcp: Update copyright informationMarcel Holtmann1-1/+1
2012-03-01dhcpv4-client: Change coding style for passing NULL to timeGrant Erickson1-5/+5
Pass NULL rather than 0 when calling time(2) to follow prefered stylistic convention.
2012-03-01gdhcp: set secs in a RFC 951- and 2131-compliant mannerGrant Erickson1-0/+15
This patch sets the BOOTP secs field in a RFC 951- and 2131-compliant manner for DHCPv4 DISCOVER and REQUEST/SELECT packets. Certain DHCP servers, such as that implemented in Mac OS X (< 10.7) for its "Internet Sharing" feature, refuse to issue a DHCP lease to clients that have not set a non-zero value in their DISCOVER or REQUEST packets. In fact, based on http://hints.macworld.com/article.php? story=20071223001432304, it's not non-zero but a value greater than four (4) seconds to allow another "authoritative" DHCP server on the subnet to reply first. Side-by-side packet analysis of Mac OS X, iOS, Android, ISC and Windows clients show that these clients set the BOOTP 'secs' field and are successfully issued a DHCP lease by Mac OS X. By contrast, a connman-based client will issue 10 back-to-back DISCOVER packets and will not be returned a DHCP OFFER from the server.