Gregory Nutt
9043b9cb6a
fs/vfs: file_seek() is an internal OS interface and should not errors via the errno
2017-09-28 13:55:36 -06:00
Gregory Nutt
ac63ffebb8
More minor cleanup after laster squashed merge.
2017-09-28 12:25:05 -06:00
Gregory Nutt
467c31637f
Minor cleanup after laster squashed merge.
2017-09-28 09:23:03 -06:00
Gregory Nutt
3aa18ef56e
Addes support for read-only routing tables. Prior to this change, routing tables were only support in RAM and had to be initialized with explicit logic to add the necessary routes to the routing table. With this change, routes may be defined in the pre-initialized, read-only routing table provided by the board-specific logic
...
This would be particularly useful, for example, in the case where there is only a single network adaptor and you want all output packets to go to the single adaptor in all cases. So for that behavior you could add a read-only routing table to the board-specific long that contains a single entry, the default route: 0.0.0.0/0.
Squashed commit of the following:
net/route: RAM and ROM routing tables build correctly in all IPv4 and IPv6 configurations.
net/route: Verify IPv6 ROM route build; Make number of ROM routes a variable, not a configuration item.
net/route: Add initial support for ROM-base, read-only routing tables.
net/route: Adjust and generalize some structures, rename some functions, and add configuration and build support that will eventually support read-only routing tables.
net/route: Some initial though experiments on use of a fixe, read-only routing table
2017-09-28 09:04:31 -06:00
Louis Mayencourt
b55005669a
net/arp/arp_out.c: Fix IGMP Ethernet address computation
2017-09-28 07:50:52 -06:00
Gregory Nutt
d88583ffcf
net/route: Permit IPv4 and IPv6 routing tables to be of different sizes
2017-09-27 12:04:51 -06:00
Bruno Herrera
24767a0c66
Fixes for problems found by Coverity in the nuttx repository:
...
net/socket/recvfrom.c: Check fromlen integrity before using it.
net/socket/net_sockets.c: Always check for valid psock before using.
net/tcp/tcp_send_unbuffered.c: Avoid using psock beforing checking its integrity.
sched/timer/timer_create.c: Fix watchdog resource leak if cannot allocate a new timer.
2017-09-25 07:17:09 -06:00
Louis Mayencourt
dfa0574e7b
net/igmp/igmp_send.c: Fix incoming IGMP checksum calculation
2017-09-25 06:55:01 -06:00
Sakari Kapanen
d0f72617ef
From b7b1826930c7da10416bceebce5d63dc8e4086ca Mon Sep 17 00:00:00 2001
...
From: Sakari Kapanen <sakari.kapanen@optofidelity.com>
Date: Sun, 24 Sep 2017 13:19:25 +0300
Subject: [PATCH] ICMPv6: fix router advertisement
Fixes several errors preventing icmpv6_radvertise.c from being compiled. Fixes conversions to network byte order (namely vlifetime, plifetime, mtu).
IPv6 source address is set to link-local IP address instead of the address in the netdev structure. This is in compliance to RFC 4861. RA didn't work on Linux before this change.
Finally, router prefix and prefix length are derived from the IPv6 address and netmask in the netdev structure. This seems to make more sense than using a predefined, separate prefix from the config.
2017-09-24 06:33:05 -06:00
Gregory Nutt
12c4c4c8a6
In some cases, packets are still not sent behind the router. I found that NuttX sends the ARP requests not to the router but to the target. Mistake in file net/route/netdev_router.c. From Aleksandr Kazantsev
2017-09-20 13:19:05 -06:00
Gregory Nutt
2790c3b024
Trivial fix in some comments.
2017-09-20 10:06:26 -06:00
Gregory Nutt
de34b96533
SIOCGIFCONF and SIOCGLIFCONF IOCTL commands should only report on network adatpors in the UP state.
2017-09-20 06:50:21 -06:00
Gregory Nutt
ae2a1d07b3
Networking: drivers/net/loopback.c: Eliminate a warning. net/netdev/netdev_ifconfig.c: Was not returning all of the address info.
2017-09-19 15:00:46 -06:00
Gregory Nutt
7af976c00a
Squashed commit of the following:
...
Networking: Add implementation of logic for SIOCGIFCONF and SIOCGLIFCOF IOCTL commnds.
Networking: Add definitions and stuctures to support SIOCGIFCONF and SIOCGLIFCONF IOCTL commands.
2017-09-19 14:17:05 -06:00
Gregory Nutt
0eee0f22cd
Networking: IPv4 getsockname(): Fix a typo that can cause a compile error.
2017-09-19 10:52:01 -06:00
Gregory Nutt
780435d9f1
Networking: sockgetname() files need to include udp/udp.h and tcp/tcp.h or otherwise NET_UDP_HAVE_STACK and NET_TCP_HAVE_STACK are undefined and the logic is never compiled. Noted by Anthony Merlino
2017-09-18 13:14:57 -06:00
Gregory Nutt
684a59f8e8
Eliminate some warnings found in build testing.
2017-09-15 14:42:50 -06:00
Gregory Nutt
cca15891c9
Networking: Fix some errors found by Coverity
2017-09-13 13:04:26 -06:00
Gregory Nutt
80412df0b1
UDP Networking: Fix unitialized variable problem found by Coverity
2017-09-13 12:12:57 -06:00
Jussi Kivilinna
7846381e09
net/socket: send: verify that sockfd is valid, fixes assert when using send on closed socket
2017-09-12 07:40:13 -06:00
Jussi Kivilinna
1fa854285d
net/socket: Do not enter cancellation point in psock_send() as this is already done in send()
2017-09-12 07:39:05 -06:00
Jussi Kivilinna
61878848ad
net/sock: recvfrom: Fix double leave_cancellation_point on error path
2017-09-12 07:17:53 -06:00
Gregory Nutt
6a6bf1b62f
:Remove CONFIG_NET_6LOWPAN_FRAMELEN. In this case where multiple radios are support3d, this may not be a constant. 6LoWPAN now always queries the driver to get the maximum frame length.
2017-09-10 11:40:54 -06:00
Gregory Nutt
c217c663ae
6LoWPAN: Remove the option to disable fragmentation support. Two reasons: (1) First fragementation is always required becaues IPv6 requires an MTU of 1280 bytes. The is no application use case that can work without fragmentation support. And (2) it greatly reduces the complexity of the code.
2017-09-10 10:49:27 -06:00
Gregory Nutt
334d1734dc
6LoWPAN/Radio: Rename radio property sp_pktlen to sp_framelen. Add 6LoWPAN utility to get the max frame length (not yet hooked in)
2017-09-10 10:13:33 -06:00
Gregory Nutt
ddde05db83
6LoWPAN: I believe, based on RFC review, that with the last multicast change, the NuttX 6LoWPAN is now compliant with RFC 6282.
2017-09-08 15:04:51 -06:00
Gregory Nutt
edf6359c87
Fix typos in Document and in some C comments.
2017-09-08 12:55:16 -06:00
Gregory Nutt
9cc85aadf6
6LoWPAN: Correct an error in uncompressing multicast address.
2017-09-08 09:23:40 -06:00
Jussi Kivilinna
547733cbb0
Update net_timedwait() and net_lockedwait() call sites to handle negated errno in return value
2017-09-04 07:56:51 -06:00
Gregory Nutt
8ffb103adb
networking: IGMP: Remove special support for interrupt level processing (there is none) and fix some timer cancellation logic. In many files, correct comments. There is no interrupt level processing in the networking layer.
2017-09-02 10:27:03 -06:00
Gregory Nutt
8c2e3a2d0a
Networking: Fix a copy/paste error introduced with recent disconnection changes.
2017-09-01 11:56:48 -06:00
Jussi Kivilinna
8042c96f09
net/local: fix server lc_waitsem overflow
2017-09-01 07:47:29 -06:00
Jussi Kivilinna
5beaad491a
Fix net_lock returning ERROR when instead of real error code on failure.
2017-09-01 07:18:16 -06:00
Gregory Nutt
afe137ffbf
net_timedwait() and net_lockedwait() no longer return errors via errno but returned negated errno values like other internal OS functions.
2017-09-01 07:13:03 -06:00
Gregory Nutt
606b7215fe
accept.c edited online with Bitbucket. Fix mismatched net_lock() and net_unlock()
2017-08-31 16:49:10 +00:00
Gregory Nutt
d74381ca72
Networking: Missed removal of one net_unlock() in previous commit.
2017-08-31 07:29:44 -06:00
Gregory Nutt
7ebef900fb
Networking: Fix a race condition. The accept() operation is performed with the network locked. However, the network is unlocked BEFORE the connected state is set. Therefore, a context switch may occur and the socket may no longer be connected when it is marked so. Noted by Pascal Speck.
2017-08-31 07:23:19 -06:00
Gregory Nutt
581db174b2
Networking: socket dup() conditional operation was missing the test for the condition.
2017-08-30 10:29:14 -06:00
Gregory Nutt
0b2a4eb4bd
Networking: A little more wording changes related to interrupts vs. events
2017-08-29 15:08:38 -06:00
Gregory Nutt
04ad162540
Networking: Clean up some naming that has bothered me for a long time... There are no interrupts and no interrupt handlers in the network. There are events and event handler (there used to to be interrupt logic in there years ago but that is long, long gone).
2017-08-29 14:08:04 -06:00
Gregory Nutt
171d183e8e
Networking: A placeholder for some missing logic in the previous change related to monitoring network status for dup'ed sockets. If one of the dup'ed socket's is closed, then network monitor resources associated with that one socket must be recovered. Also, in the event that socket is being used on one thread, but then closed on another, any threads waiting for events from the socket should be informed of the closure. That latter requirement is not implemented because current data structures do not support it.
2017-08-29 13:24:49 -06:00
Gregory Nutt
0f7a52bc28
Networking: Fix a runaway recursion problem introduced the previous fixe for shutting down dup'ed sockets.
2017-08-29 12:27:58 -06:00
Gregory Nutt
d40ee8e79d
Networking: Start the network monitor for a socket when a TCP socket is dup'ed.
2017-08-29 10:53:04 -06:00
Gregory Nutt
9db65dea78
Networking: TCP disconnection callbacks are not retained in a list. This will support mutiple callbacks per lower-level TCP connection structure. That is necessary for the cae where a socket is dup'ed and shares the same lower-level connection structure. NOTE: There still needs to be a call to tcp_start_monitor() when the socket is dup'ed.
2017-08-29 10:38:01 -06:00
Gregory Nutt
ed58536c3a
Networking: Move two more TCP specific files from inet/ to tcp/. There is other TCP-specific logic in inet/ that should be moved sometime, but those are more entangled.
2017-08-29 09:25:22 -06:00
Gregory Nutt
92f44c5607
Networking: Move net/inet/net_monitor.c to net/tcp/tcp_monitor.c in preparation for design change to fix monitoring of duplicated sockets.
2017-08-29 08:40:13 -06:00
Gregory Nutt
f43f372823
Update some comments.
2017-08-26 11:50:41 -06:00
Nickolay Semyonov (RPI)
1fcc7ec38e
Ommitted a file in previous commit
2017-08-26 11:45:08 -06:00
Gregory Nutt
88a87f8e3f
6LoWPAN: The original, Contiki-based design used only a single buffer for reassemblying larger packets. This could be a problem issue for hub configurations which really need the capability concurrently reassemble multiple incoming streams concurrently. These was also a design issue in that the reassembly buffer could be corrupted by outgoing packets. The design was extended to support multiple reassembly buffers, each associated with the reassembly tag and source address. This assures that there can be be no corruption of the reassembly once it has started.
2017-08-26 10:00:47 -06:00
Gregory Nutt
e89edd6784
Networking: Rethink last fix. We can make this less protocol dependent.
2017-08-23 15:30:56 -06:00