Test that we drop the received packet if the destination
address is organisation scope (ff08::) multicast address.
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
If we receive an IPv6 packet with organisation scope multicast
address FF08:: then we must drop it as those addresses are
reserved for organisation network traffic only.
Fixes#10961
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
Test that we drop the received packet if the destination
address is site scope (ff05::) multicast address.
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
If we receive an IPv6 packet with site scope multicast
address FF05:: then we must drop it as those addresses are
reserved for site network traffic only.
Fixes#10960
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
Test that we drop the received packet if the destination
address is zero scope (ff00::) multicast address.
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
Test that we drop the received packet if the destination
address is interface scope multicast address.
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
If we receive an IPv6 packet with interface scope multicast
address FF01:: then we must drop it as those addresses are
reserved for local network traffic only.
Fixes#10959
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
For Bluetooth, the link address is set only after the Bluetooth
connection is established. Because of this, place the link address
check to net_if_up() because at that point the link address should
be set properly.
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
Fixed the case when TXDONE signal was not cleared. Bug was unnoticed
because UART backend was synchronous.
Signed-off-by: Krzysztof Chruscinski <krzysztof.chruscinski@nordicsemi.no>
Shell log backend was enabled too early, before shell thread was
up and running. That could lead to failure if log thread passes
log message to shell log backend.
Additionally, modified algorithm for multiplexing log output with
shell prompt. In case of logs flood prompt was unreadable because
it was deleted immediately after being printed. Added k_sleep
after printing prompt if any character was typed. This ensures that
shell prompt is readable if user uses it.
Signed-off-by: Krzysztof Chruscinski <krzysztof.chruscinski@nordicsemi.no>
Functions are declared as noreturn but they do in fact return (when
control reaches the end of the body, since it doesn't enter an infinite
loop, it doesn't call other "noreturn" functions, etc.)
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
There's a lot of code which assumes net_if_get_link_addr(iface)->addr
Forgetting to set it leads to deferred, spectacular crashes. It's
impractical to assert it on every usage. So, instead let's assert
it after call to driver->init(), as that is supposed to set it.
Signed-off-by: Paul Sokolovsky <paul.sokolovsky@linaro.org>
Fixes following warning:
...
subsys/net/lib/dns/llmnr_responder.c:24:0:
subsys/net/lib/dns/llmnr_responder.c: In function ‘recv_cb’:
include/net/net_pkt.h:1203:9: warning: ‘addr’ may be used uninitialized
in this function [-Wmaybe-uninitialized]
return net_pkt_append(pkt, len, data, timeout) == len;
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
subsys/net/lib/dns/llmnr_responder.c:306:14: note: ‘addr’ was declared
here
const u8_t *addr;
^~~~
...
Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
Fixes warning:
warning: ‘ipv6’ defined but not used [-Wunused-variable]
static struct net_context *ipv6;
Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
Move configuration to overlay-netusb.sonf, enable zero-configuration,
working with LLMNR in Windows and avahi-autoipd in Linux.
Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
In 0d811b9aee the gcc-mulitlib package
was removed from the Ubuntu list of packages to install.
Seems this may be creating some confusion for some developers (see
comments in #10243)
Let's add it back.
Signed-off-by: Alberto Escolar Piedras <alpi@oticon.com>
Since the mb_display driver is specific to the microbit we can move
the GPIO pin defines from board.h into the driver. This lets us remove
one of the few remaining drivers that is including board.h
Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
Move the GPIO info for the buttons into the dts, this lets us match what
all other boards are doing. Update some sample & test code to use the
dts generated SW0_GPIO_CONTROLLER define instead of SW0_GPIO_NAME.
Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
The phrase "object must have _k_object_init() on it at some point"
visibly misses "called".
Signed-off-by: Paul Sokolovsky <paul.sokolovsky@linaro.org>
XCC does not support the "-undef" flag so set NOSYSDEF_CFLAGS to
empty string to fix compile warning.
Also, XCC does not supply the macro __SIZEOF_LONG__ which breaks
the build. So define it.
Signed-off-by: Daniel Leung <daniel.leung@intel.com>
Not all compiles/linkers support the GCC flags to not include standard
defines, include files and libraries. So make these parameters such
that the toolchain can define them when supported.
Also, according to documentation, -nostdlib does the same for both
-nostartfiles and -nodefaultlibs. So remove the redundant ones.
Signed-off-by: Daniel Leung <daniel.leung@intel.com>
The CMake extension 'generate_inc_file_for_target()' has some code for
generating a unique target name that is needed elsewhere, for instance
by DeviceTree.
Make the code re-usable by refactoring it out into it's own function.
Signed-off-by: Sebastian Bøe <sebastian.boe@nordicsemi.no>
Added a check at compile time to ensure the HW models are either
the desired version or newer.
Otherwise print a warning.
The check can be disabled by setting the enviroment variable
NO_NRF52_BSIM_VERSION_WARNING.
Signed-off-by: Alberto Escolar Piedras <alpi@oticon.com>
Macro is used to create contiguous bitmask between the
arguments passed to the macro.
BITS_PER_LONG is computed as the multiplication of predefined
macros `__CHAR_BIT__` and `__SIZEOF_LONG__`.
Both gcc and clang support these predefined macros.
With this change, replace the redundant defintions of
GENMASK with the new generic macro available.
Fixes#10843
Suggested-by: Ulf Magnusson <Ulf.Magnusson@nordicsemi.no>
Signed-off-by: Himanshu Jha <himanshujha199640@gmail.com>
Add two tests that will check if the source or destination address
is loopback address ::1 and we drop those packets.
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
We must drop packet that is received from outside and which has
IPv6 loopback address (::1) either as a destination address or
source address.
Fixes#10933
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
We don't need board.h, but by including it we would end up picking up
stdio.h from somewhere which we need for sprintf. So just included
stdio.h and drop board.h
Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
For blink_led, fade_led, and rgb_led, we only need board.h for the
hexiwear_k64 board. Remove other references to board.h and only
include it if we are building on hexiwear_k64
Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
Remove some references <board.h> that aren't need or replace them with
<soc.h> where that is the proper include to pull in. Also use "board.h"
instead of <board.h> for how we include the file when its local to the
board code itself.
Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
The HID mouse sample uses the GPIO to read the state of a button, but
does not enable CONFIG_GPIO, causing the example to fail. Fix that.
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
Adds a new configuration to the peripheral_hr sample that utilizes the
frdm_kw41z as a ble controller shield.
Signed-off-by: Maureen Helm <maureen.helm@nxp.com>
The frdm_k64f and mimxrt1050_evk boards do not have native bluetooth
support, but rather require an arduino shield to supply a ble controller
over serial hci. Convert the dts to use the newly introduced frdm_kw41z
ble controller shield.
Signed-off-by: Maureen Helm <maureen.helm@nxp.com>
The frdm_kw41z can be used as a standalone board or as an arduino
shield. Zephyr already supports the standalone configuration, this
change introduces support the arduino shield configuration.
In the arduino configuration, the frdm_kw41z operates as a ble
controller over serial hci. It can be attached to another board, such as
the frdm_k64f or mimxrt1050_evk, which runs the ble host.
Signed-off-by: Maureen Helm <maureen.helm@nxp.com>
The dma_tx_callback() function signature is different than the one
required by struct dma_config. So change the signature to fix
a compiler warning.
Signed-off-by: Daniel Leung <daniel.leung@intel.com>