Print error if IP stack is corrupted, best option would
be to reboot the device.
Change-Id: Ie92782de2fe0f323c9461fa21e90e545ccd23449
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
Use the data length in net_buf as a master value when
replying the data.
Change-Id: I2184890b0ed8d26b700ee75b9e4b6d5a466e649c
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
Make sure that the default link MTU for IPv6 networks
is used (1280 bytes). If this is left out the default would
be 128 bytes. This setting is only needed because the values
are used in tinyDTLS project.
Change-Id: I6873b8383be6355d616910aa58a03317e92dc8f8
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
Use net_buf when sending data in order to allow bigger
messages to be sent. Earlier the max. msg length was
200 bytes, now it is 1280 bytes.
Change-Id: Id5550de45b61c6fa6410258776cd8240efb1570e
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
Using appdata pointer is more logical here. There was no
error in earlier code either.
Change-Id: Ic1557f01b2b016484d75fdff00f3fc02c9debac5
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
Documenting the function that returns the used UDP connection
pointer. This function is needed for example in tinyDTLS
server implementation.
Change-Id: I08aae798dab0749912694d6338de91dcbd13df84
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
Add NET_BUF_IP() and NET_BUF_UDP() macros that return
correct struct containing either IP or UDP data.
Change-Id: I43b828ef78c1f13ccee41e6a60daa36145a35eba
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
Instead of having IP address and UDP port as separate fields
in session struct, place them inside an address struct.
This way the session size field will have a proper size
and we can use the dtls_session_init() function when initializing
the session.
Change-Id: I0560750bdd7189e24bf720a3bad240df2a3fc7fe
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
The PROCESS_CONTEXT_END() macro used wrong variable. This is
only cosmetic as the variable is not used in macro but for
consistency use the proper variable name.
Change-Id: Ia9537f4c78e6573b955fd91482e033d96cdaf66b
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
Use sys_clock_ticks_per_sec that is defined from Kconfig,
to set the Contiki clock.
Change-Id: I1d0198fb39e83a59258b7c067107c25b63db50ed
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
User is able to enable tinyDTLS support via Makefile.
Change-Id: I383bf69756fe3540b63bcd5793e2a1a31231d6b1
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
This is originally from git@github.com:YanziNetworks/tinyDTLS.git
commit d7ca5120e7e853f76e9743db2a0236a26ba71363
Change-Id: I6e6c2da76e11b473ead1b0ddac929f8bd670d7e3
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
bt_smp_sign_verify() checks signature if csrk is present.
Change-Id: I90be8be769539860a245b141bf27549a3506a111
Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
Sign data using AES-CMAC algorithm and add test to self-tests executed
at init.
Change-Id: If01ec38a9897f74c26d1ba5c32304114d208549a
Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
Make menuconfig screen more logical placing self-tests option inside
Bluetooth block. Currently self-tests looks not belonging to
Bluetooth.
Change-Id: I1ad2826b1dd09fb7c9b67aace1ad5f280543104d
Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
Make stack size the same size as in hello app. Current stack cannot
handle correctly security tests.
Change-Id: I5946c6bbcbc5079cefefddbb229b3205364b24d0
Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
This adds gatt-write-without-response which can be used as following:
btshell> gatt-write-without-response <handle> <data>
bt: bt_gatt_write_without_response (0x0010f0a0): handle 0x0011 length 1
Write Complete (err 0)
Change-Id: Ide166049cf53e691a2269778bca1489f7027621f
Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
Checking for (!conn && conn->state != BT_CONN_CONNECTED) makes NULL
dereference in a case conn is NULL.
Change-Id: I73c93e4eefad046eecb76958184880ef8b72676e
Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
This split the use of ATT Write Command and ATT Write Request since with
the former it is possible to sign the data thus making combinations of
parameters in bt_gatt_write complex/confusing.
Change-Id: I0349acd16d22ea4e38ac3e5ad8c3cdc318851633
Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
Importing patch 9974bb6599333cface655bd63b01dfbbfe5dcead from Contiki.
Original commit by Niclas Finne <nfi@sics.se>
Change-Id: I90e6da7c596edca6f8c78f667cc14723b9e3f2d7
Signed-off-by: Ravi kumar Veeramally <ravikumar.veeramally@linux.intel.com>
Importing patch b541cd24725591f586162497b493f37902120217 from Contiki.
Original commit by Niclas Finne <nfi@sics.se>
Change-Id: Id8a287c2cd21966039397ab7a596d978a14941f2
Signed-off-by: Ravi kumar Veeramally <ravikumar.veeramally@linux.intel.com>
Add support for handling multiple interleaved fragmented
IPv6 packets. Non fragmented packets will no longer disturb
the reassembly at all.
Importing patch 8489582746e401e0c52b9f7e861bdd759924017e from Contiki.
Original commit by Joakim Eriksson <joakime@sics.se>
Change-Id: I2202779cb71dd12c0cbe05e8a96e34ded2e65995
Signed-off-by: Ravi kumar Veeramally <ravikumar.veeramally@linux.intel.com>
Importing patch e5616fc4687827818b78e66825e7da6d37de858a from Contiki.
Original commit by Joakim Eriksson <joakime@sics.se>
Change-Id: Ic53fb92f33d1d77d659c2368cc13b1314de11ea6
Signed-off-by: Ravi kumar Veeramally <ravikumar.veeramally@linux.intel.com>
Importing patch b21deba19914d95e6dfe92a902d1a406d167be43 from Contiki.
Original commit by Niclas Finne <nfi@sics.se>
Change-Id: I2be1719f169394f0a9fd0f43b1ae878e018e95c3
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
Importing patch 565ff0b3dcaca5d0c31ba388447e3f71c914ccc8 from Contiki.
Original commit by Niclas Finne <nfi@sics.se>
Change-Id: I27014bf0af0770cd7f572655f288b6c382fdd659
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
Importing patch 5eea977ea24145b2181a4faf182951016cf3a199 from Contiki.
Original commit by Niclas Finne <nfi@sics.se>
Added callback to DIO handling for application control if a RPL DAG
should be joined or not (originally implemented by Joakim).
Change-Id: If22bfea13c456d5e170cc2c952a8d6ad48a6b37d
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
Importing patch 778e6536b022fe24398d3c026bb99ff35b07495b from Contiki.
Original commit by Maciej Wasilak <wasilak@gmail.com>
Change-Id: I70f5cf2b1abd8f3748623d0217d9f0ef830e128c
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
Importing patch d935acc7c115503ad5192e30ef832796d3dd6795 from Contiki.
Original commit by Niclas Finne <nfi@sics.se>
Change-Id: I4c3a9c23bde26631bbe5917568a17574898713f9
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
Importing patch 9782a760b1165af7849a742a7a30767f2d4c7137 from Contiki.
Original commit by Laurent Deru <laurent.deru@cetic.be>
Change-Id: Ife33e5c38fcf00dab592df79fb8c843240ef39a4
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
Cast clock_time_t to unsigned for portable printout
in rpl_print_neighbor_list().
Importing patch fc178dab876ea8ac72f4c0f1395fea1f71f9df81 from Contiki.
Original commit by Simon Duquennoy <simonduq@sics.se>
Change-Id: If5a0adcbc8aafd0a2bda8788173000bd8c4c9d7f
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
When no probing target is found, probe least recently updated parent.
Importing patch 9ced5b7bac2150f993ba0c6e602f279e7b27127f from Contiki.
Original commit by Simon Duquennoy <simonduq@sics.se>
Change-Id: If494663ed7df38865d3a8776c56de74bf2d2fc04
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
Importing patch 832a4d3e01349458a48a585e2e1af72ec6be0411 from Contiki.
Original commit by Simon Duquennoy <simonduq@sics.se>
Change-Id: Ida5dff1a5d592f77fb1a21b4016ea4fd4c10db80
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
Made the first argument to uip_connect() const, to ensure it isn't altered
Importing patch daef1ea252feca2ae540c2c06f5f49496231a209 from Contiki.
Original commit by Adam Dunkels <adam@thingsquare.com>
Change-Id: I92a8c389b0331c2cddcdac0190965209a4488eb3
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
Importing patch daef1ea252feca2ae540c2c06f5f49496231a209 from Contiki.
Original commit by Adam Dunkels <adam@thingsquare.com>
Cast the addresses when copying IPv4 and IPv6 addresses using
the IPv4 and IPv6 copy macros.
Change-Id: Id34a294c653ec3310ef8152e600db3eb39778ae1
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
Importing patch 06daa08ffc4da0f0e2e5d32c222c0f513d273cec from Contiki.
Original commit by Adam Dunkels <adam@thingsquare.com>
Change-Id: I20b69b440923061f1993f7063c668351ee304a77
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
Importing patch 6a5f238255a3a3450db2588cba7383d1be8529a0 from Contiki.
Original commit by Simon Duquennoy <simonduq@sics.se>
Change-Id: I4684d403a8a3d65f442f11f2d66f53c6968709aa
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
Will now probe the least recently updated parent from time to time.
Importing patch 2dd182f4a8a322867f90cdbc8f1a983b972ac7cd from Contiki.
Original commit by Simon Duquennoy <simonduq@sics.se>
Change-Id: Ifa87485a3a5fdb895cf3fc375ef9589cbbb950f6
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
Importing patch 47ba4c0c4bd81fd429ba23557aa44ee75daa2b3a from Contiki.
Original commit by Simon Duquennoy <simonduq@sics.se>
Change-Id: I30da9aac6f1057239fc3689996aa45b0a019f6f6
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
Importing patch 529376be7758eec8320e695c1efb5e416f2d8c1c from Contiki.
Original commit by Simon Duquennoy <simonduq@sics.se>
Change-Id: I21aebbdff3687e6d29c4c28afa7d8095e185dc8b
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
Importing patch 8344290e0898bb54a68d0e417a7a1c6dee992200 from Contiki.
Original commit by Simon Duquennoy <simonduq@sics.se>
Change-Id: I46ab31bbba06a54f020ec792a4e12ef60ae3caff
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
Importing patch 9d94c4efae9c7604790034264d22e6cbf7fb61cd from Contiki.
Original commit by Laurent Deru <laurent.deru@cetic.be>
Change-Id: Iffd51ce5b4e68acf7e15b4559843f128cf5f13d0
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
Importing patch 49bfb1308db8eff186677bcd8f1dd3861d9b26d8 from Contiki.
Original commit by Laurent Deru <laurent.deru@cetic.be>
Change-Id: I307fbec3ff6325a06c895411b83b811c2a392d44
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
Now uses net_receive() with a proper timeout. Removed also
extra waits when sending data. Removed extra semaphores
and streamlined the code to act as fast as possible.
Change-Id: I577d4d5ff85bf13400fb6e157bc0023267658ba4
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
Make sure to use the correct fifo wait function for microkernel.
Change-Id: Ie3e365a2e24836485d028c05c936c30dfce91ba4
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
This debug print will flood the console is certain scenarios
so remove it.
Change-Id: I9e1d04ef48d9a6acf21c360c5ebb0dfa15c0173f
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
Added comment how UDP packet is handled when receiving it.
Change-Id: If1e10c5bde55cb2cf7a8928b0f1ec38dd6ab84b4
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>