The bug was introduced by commit ID
a136a2587752cca256950b0efd5567ca29117d11
Which led to write junk as an address into cc2520 and thus made the
chip filtering out all unicast packet (as the incoming address never
matched)
Change-Id: I72009e795039f2059177a5b37a4bcf5d9717d65d
Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
This commit tries to improve inline documentation by refactoring
the original text. Missing information is also added, for example:
function return codes.
Change-Id: I940d4b6fa3e8079323e5e0ec1e5f63407505c9d9
Signed-off-by: Flavio Santes <flavio.santes@intel.com>
As it used directly as the ieee addr.
Propre endianess will have to be solved once this stack will be ported
to other arch than x86.
Change-Id: Ie556fabbd99cc5559025c8392d2f699facb007fa
Signed-off-by: Tomasz Bursztyka <tomasz.bursztyka@linux.intel.com>
In a case prefix is valid do not return prematurely.
Change-Id: I4d3a7567787c4bd74a2d66a642b632c32e675be3
Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
Fix returning without linking laddr to the neighbor, return only when
neighbor is not found.
Change-Id: I284d42bf5b3ffde6487f669be0f95ad40368674a
Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
At the moment after receiving Neighbor Solicitation from the peer
a new neighbour is created with unassigned lladr resulting in
error later one below:
...
[net/nbr] [ERR] net_nbr_get_lladdr: {assert: 'idx <
CONFIG_NET_IPV6_MAX_NEIGHBORS' failed} idx 255 >= max 8
...
Change-Id: Ieb218fa5e850f018255b6080cbc0c7764595d40c
Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
The patch fixes calculation of link address length. In a case of
IEEE802154 link address is 8 bytes long and formula for Source/Target
Link-layer Address calculation gives value 2 * 8 - 2 = 14 bytes.
Change-Id: I27570d4d45d348e53f7f63cb4681a1c8c5150e5e
Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
The net_ipv6_set_reachable_time() was incorrectly named, the
correct name is net_if_ipv6_set_reachable_time().
The _if_ prefix needs to be there as the function is located
in net_if.c file.
Change-Id: Ic841328bdff92fbb90f51a199ebbee82d7b1c9fd
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
Tests for net_nbuf_read, net_nbuf_write and net_nbuf_skip API's.
Change-Id: I77f702dda8c9df7892120f47ff03a6b256191d31
Signed-off-by: Ravi kumar Veeramally <ravikumar.veeramally@linux.intel.com>
Helper functions to read and write data across multiple fragments.
Write function always adds at the end of last fragment. If there is
no space in last fragment new data fragment will be created and added
to input buffer.
Read function start reading from offset of input fragment. If the
required data is located in mutliple fragments it reads from list
of fragments and returns position and fragment where read stopped.
Skip function start skipping from offset of input fragment. If the
required length is across multiple fragments it skip till length and
returns position and fragment where read stopped. This is useful
when reading with unwanted data (reserved or unhandled data).
These functions are quite useful when handling with multiple fragments.
Change-Id: I348b869108724602ae780a1cba4fe17d3af7ffc2
Signed-off-by: Ravi kumar Veeramally <ravikumar.veeramally@linux.intel.com>
Distant address is always plain: pan id and address. Using comp
generated a bug where pan_id was overwritten with ll address parts.
Change-Id: I19c6df0b3e7072a3e8d2b9539e5aef69fe309a4a
Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
One second timeout seems to be too short as some test runs
fail when run in Jenkins.
Change-Id: Ifb01929148415961712468e3cc85387aac5eb2bb
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
We have no use of configuring cc2520, at built time at least, in
promiscuous mode. So let's get rid of these options for the new driver.
Change-Id: I17611c43bc7ba7961831beaa47cc4e2371f8de61
Signed-off-by: Tomasz Bursztyka <tomasz.bursztyka@linux.intel.com>
No need to store the nbr pool data into a dedicated section
as we have only one nbr pool defined.
Change-Id: I6f2afcce57b5f588878496bf085567b938e32c80
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
Provide a generic API for managing routing entries in the system.
Change-Id: I917a2deaafe3f340a2852ec190817ed27b3d4d7b
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
Print allocation/deallocation caller in order to find neighbor
leaks.
Change-Id: Ib383f82043a9aba44768774c5acfeb81f076a960
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
Print the lladdr index value if it is over the limit. This helps
debugging.
If lladdr is not known, then print "<unknown>" instead of
link layer address with all bits zeros.
Change-Id: If9926c1cde0540746254cff115bb5b7001e96143
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
If the reachable timer expires and if the neighbor has been
removed already, then do not try to access neighbor data via
a null pointer and crash.
Change-Id: I6d9a96f3fd2a20d4897509ebb9ad48bc455a51da
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
Add utility function net_ipv6_nbr_lookup_by_index() which
returns neighbor that is using certain link layer address
specified by a link layer index value.
Change-Id: I1dad3d9eacd8358428b77b8fe53c5306d391e1ef
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
One parameter was not documented.
Typos fixed in parameter description.
Change-Id: I6007a2dc7548e30e09347374df7e510a1fd27b9d
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
Explain how to use net_context connectivity API.
Change-Id: Ifa57af3e05ca424dfbd30a17608a1dd59646caf9
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
This document describes the network stack architecture of the
new IP stack.
Change-Id: I19f7c77c66115e6453bcde0d41bb7cada3efc5e1
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
This fixes bug setting incorrect long ieee802154 address and also
print address in BE byte order the same way as for Linux.
Change-Id: I774301e992372588dffa6ce5964fb119642a0a0d
Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
It's an empty beacon frame, juste to validate the Beacon frame parsing
logic.
Change-Id: I90916eb87187c9eae9b2267f34dc93bee554d4b5
Signed-off-by: Tomasz Bursztyka <tomasz.bursztyka@linux.intel.com>
Such frames will be the corner stone to deal with PAN.
For now, it only validates such frame, verifying the FCF and the whole
length.
Change-Id: I8a441911d658d35abebf690e70a69337fc26d851
Signed-off-by: Tomasz Bursztyka <tomasz.bursztyka@linux.intel.com>
MAC adress is BE, but IEEE 802.15.4 address is LE. Since we generate the
later on the first one, we need to reverse the MAC address.
Change-Id: I9bab4cf91494276e7cd4ea09290e82c477a43646
Signed-off-by: Tomasz Bursztyka <tomasz.bursztyka@linux.intel.com>
Address state is preferred when adding it to interface. State might
get change as per lifetime(limited/infinite) (e.g. expiry or renewal
period). Handle it properly.
Change-Id: I0e663171a125b0895b4574cd6ea147d0148ef8c6
Signed-off-by: Ravi kumar Veeramally <ravikumar.veeramally@linux.intel.com>
In-case of DHCPv4 IP address negotiation message time frame,
interface doesn't have any assigned IP address. All the packets
will be dropped.
DHCPv4 client listens on server port(67) client port(68). Client
service will register a listener and listens on those ports. So
update the checkpoints accoring to it.
Change-Id: Ib046a4e1150c6b2277b0c06614970a619d0be589
Signed-off-by: Ravi kumar Veeramally <ravikumar.veeramally@linux.intel.com>
In case of broadcast or multicast destination address, ARP
message is not required. But ethernet_send assumes net_arp_prepare()
returns ARP buffer and doesn't fill any LL header information in
all fragments.
So checking whether destination address is broadcast or multicast
in ethernet and fill LL headers according to the case. Lets assume
if net_arp_prepare() returns success means that is ARP message.
Change-Id: If5909d04d993b1690ae44cd9f5af43b8346d3a72
Signed-off-by: Ravi kumar Veeramally <ravikumar.veeramally@linux.intel.com>
Multipackets support not handled perfectly and breaks regular
flow on some occasions. So remove this support and have to
implement properly.
Change-Id: I1b72c66479c3516df6e6e93998edff1260eb839d
Signed-off-by: Ravi kumar Veeramally <ravikumar.veeramally@linux.intel.com>
If ethernet address is broadcast or multicast, l2 layer does not
send any ARP messages. Handle this scenario in ethernet tests.
Change-Id: I8e11832803e1539887152447090d1286c7fa3eb0
Signed-off-by: Ravi kumar Veeramally <ravikumar.veeramally@linux.intel.com>
If the connection establishment has an error, the accept
callback needs to be able to return that error to user space
so that the application can know about it.
This is especially important in TCP where application needs
to start to listen again if reset is sent during connection
establishment.
Change-Id: I55f36e4f101c7237c1288f09baf6e602b33da2b3
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
So we can easily access TCP buffer that is stored
in net_buf.
Change-Id: I37ae728be45ded2fcc74735592d94897c945afbe
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
This will remove given amount of data from the fragment list.
Change-Id: I17d809982af0b941f957205688ee61e5ac3c1f08
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
This is needed because if there are more than one network
interfaces configured, then the second interface will point
to wrong address. Only solution to this issue is to align
the net_if to 32 byte boundary. The issue was seen in qemu
and it is not really known if the issue is present in real
hardware.
Change-Id: I2048c8a9a0aab51f84c15539159410b544f6c9b1
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>