nuttx/include
Gregory Nutt 7332d2decf net/: Add missing packet filtering checks
NuttX provides the UDP_BINDTODEVICE socket option.  This is a UDP protocol-specific implementation of the semi-standard Linux SO_BINDTODEVICE socket option:  "SO_BINDTODEVICE forces packets on the socket to only egress the bound interface, regardless of what the IP routing table would normally choose. Similarly only packets which ingress the bound interface will be received on the socket, packets from other interfaces will not be delivered to the socket." https://codingrelic.geekhold.com/2009/10/code-snippet-sobindtodevice.html

If CONFIG_NET_UDP_BINDTODEVICE is selected and a UDP socket is bound to the device, then unrecognized packets UDP packets must not be dropped, but must be forwarded along to the bound socket unconditionally.

It the typical case, this should have no impact.  It does effect the applications that use DHCP and do select the UDP_BINDTODEVICE socket option.

This PR replace existing improper logic in the code and also the improper attempts to fix problems from PR #3601 and PR #3598.  Those changes are improper because they expose DHCP appliction dependencies in the OS, breaking modularity and independence of the OS and application.

Tested with stm32f4discovery:netnsh with CONFIG_NET_UDP_BINDTODEVICE.  A proper DHCP test setup is needed, however.
2021-04-29 12:47:02 +08:00
..
arpa nxstyle fixes 2020-04-11 21:19:47 +01:00
cxx include: Author: Gregory Nutt: update licenses to Apache 2.0 2021-02-04 03:33:58 -08:00
net net/: Add missing packet filtering checks 2021-04-29 12:47:02 +08:00
netinet include: Author: Gregory Nutt: update licenses to Apache 2.0 2021-02-04 03:33:58 -08:00
netpacket sourcefiles: Fix relative path in file header 2021-03-09 23:18:28 +08:00
nuttx Add experimental support for an eZ80 toolchain using llvm and GNU binutils. 2021-04-27 21:18:48 -03:00
sys sys/socket.h: Add "Socket"-level control message types 2021-04-03 01:02:07 -05:00
.gitignore build: Remve the unnecessary .gitignore 2020-05-23 18:00:40 +01:00
aio.h fs: allocate file/socket dynamically 2021-03-17 06:46:42 -07:00
alloca.h include: Author: Gregory Nutt: update licenses to Apache 2.0 2021-02-04 03:33:58 -08:00
assert.h libc/assert: Reference the expression in all case 2021-04-03 21:00:41 +01:00
crc8.h NuttX: Ken Pettit: update licenses to Apache 2021-04-10 06:42:19 -05:00
crc16.h include: Author: Gregory Nutt: update licenses to Apache 2.0 2021-02-04 03:33:58 -08:00
crc32.h include: Author: Gregory Nutt: update licenses to Apache 2.0 2021-02-04 03:33:58 -08:00
crc64.h include: nuttx: fix nxstyle errors 2021-02-04 03:33:58 -08:00
ctype.h include: Author: Gregory Nutt: update licenses to Apache 2.0 2021-02-04 03:33:58 -08:00
debug.h debug: add motor related debug messsages 2021-04-01 15:43:49 -03:00
dirent.h include: Author: Gregory Nutt: update licenses to Apache 2.0 2021-02-04 03:33:58 -08:00
dlfcn.h include: Author: Gregory Nutt: update licenses to Apache 2.0 2021-02-04 03:33:58 -08:00
dsp.h libdsp: fix typos 2021-04-01 01:24:12 -05:00
dspb16.h libdsp/fixed16: add openloop handler 2021-04-01 14:54:33 -03:00
elf32.h include: Author: Gregory Nutt: update licenses to Apache 2.0 2021-02-04 03:33:58 -08:00
elf64.h Add missing Elf_Addr typedef 2020-04-30 08:46:21 -06:00
elf.h arch: Select 64bit elf base on the architecture characteristic 2020-05-31 21:38:32 -07:00
endian.h include: Author: Gregory Nutt: update licenses to Apache 2.0 2021-02-04 03:33:58 -08:00
errno.h Completes the Implementation of the TLS-based errno 2020-05-07 23:11:34 +01:00
execinfo.h execinfo: include-able from C++ files 2021-04-19 04:45:04 -07:00
fcntl.h include: Author: Gregory Nutt: update licenses to Apache 2.0 2021-02-04 03:33:58 -08:00
fixedmath.h include: Author: Gregory Nutt: update licenses to Apache 2.0 2021-02-04 03:33:58 -08:00
ftw.h include: Fix typos reported by codespell 2021-02-25 11:30:38 -08:00
getopt.h Implement getopt_long() and getopt_long_only() 2021-04-01 23:06:23 -05:00
grp.h libs/libc: License Clearance 2021-03-02 03:44:06 -08:00
hex2bin.h include: Fix typos reported by codespell 2021-02-25 11:30:38 -08:00
inttypes.h include: Author: Gregory Nutt: update licenses to Apache 2.0 2021-02-04 03:33:58 -08:00
iso646.h include: Add iso646.h for alternative spellings 2021-03-04 18:32:12 -08:00
libgen.h include: Author: Gregory Nutt: update licenses to Apache 2.0 2021-02-04 03:33:58 -08:00
limits.h limits.h: modify _POSIX_OPEN_MAX to 16 2021-03-29 05:51:27 -07:00
locale.h include: Author: Gregory Nutt: update licenses to Apache 2.0 2021-02-04 03:33:58 -08:00
lzf.h sourcefiles: Fix relative path in file header 2021-03-09 23:18:28 +08:00
malloc.h mm: Implement malloc_usable_size 2020-08-24 03:36:44 -07:00
mqueue.h include: Author: Gregory Nutt: update licenses to Apache 2.0 2021-02-04 03:33:58 -08:00
netdb.h netdb.h: Change all tab to space 2021-03-26 18:04:59 +01:00
nxflat.h include: Author: Gregory Nutt: update licenses to Apache 2.0 2021-02-04 03:33:58 -08:00
poll.h sched: Add include/sys/poll.h 2021-01-06 14:23:50 +08:00
pthread.h include: Author: Gregory Nutt: update licenses to Apache 2.0 2021-02-04 03:33:58 -08:00
pwd.h libs/libc: License Clearance 2021-03-02 03:44:06 -08:00
queue.h include: Author: Gregory Nutt: update licenses to Apache 2.0 2021-02-04 03:33:58 -08:00
resolv.h libc: Add b64_ntop and b64_pton implementation 2020-12-28 13:53:20 -03:00
sched.h mqueue: simplify the mqueue reailize 2021-01-05 02:40:43 -06:00
semaphore.h include: Author: Gregory Nutt: update licenses to Apache 2.0 2021-02-04 03:33:58 -08:00
signal.h sched/signal: Implement SA_NODEFER and SA_RESETHAND 2021-03-31 18:27:01 -03:00
spawn.h include: Author: Gregory Nutt: update licenses to Apache 2.0 2021-02-04 03:33:58 -08:00
stdbool.h include: Author: Gregory Nutt: update licenses to Apache 2.0 2021-02-04 03:33:58 -08:00
stddef.h include: Author: Gregory Nutt: update licenses to Apache 2.0 2021-02-04 03:33:58 -08:00
stdint.h stdint.h: Use conversion macros for the definition of MIN and MAX constants 2021-02-18 18:35:35 -08:00
stdio.h include: Author: Gregory Nutt: update licenses to Apache 2.0 2021-02-04 03:33:58 -08:00
stdlib.h umm_heap/valloc: support valloc (LEGACY) 2021-02-26 11:47:11 -08:00
stdnoreturn.h include: Author: Gregory Nutt: update licenses to Apache 2.0 2021-02-04 03:33:58 -08:00
string.h include: Author: Gregory Nutt: update licenses to Apache 2.0 2021-02-04 03:33:58 -08:00
strings.h include: Author: Gregory Nutt: update licenses to Apache 2.0 2021-02-04 03:33:58 -08:00
syscall.h include: Author: Gregory Nutt: update licenses to Apache 2.0 2021-02-04 03:33:58 -08:00
syslog.h include/debug.h/syslog.h: Fix small typos and repeated words 2021-03-22 06:06:44 -07:00
termios.h include: Author: Gregory Nutt: update licenses to Apache 2.0 2021-02-04 03:33:58 -08:00
threads.h include: Author: Gregory Nutt: update licenses to Apache 2.0 2021-02-04 03:33:58 -08:00
time.h include: Author: Gregory Nutt: update licenses to Apache 2.0 2021-02-04 03:33:58 -08:00
unistd.h Add define for _POSIX_TIMEOUTS 2021-04-11 01:50:34 -05:00
uuid.h libc: Add uuid implemenation 2020-07-21 21:48:18 -07:00
wchar.h include: Author: Gregory Nutt: update licenses to Apache 2.0 2021-02-04 03:33:58 -08:00
wctype.h include: Author: Gregory Nutt: update licenses to Apache 2.0 2021-02-04 03:33:58 -08:00