Commit Graph

1668 Commits

Author SHA1 Message Date
Gregory Nutt
a588d64b45 net/procfs/netdev_statistics.c: Fix a error found in build testing. 2018-11-20 08:09:03 -06:00
Gregory Nutt
1fd9eb6069 net/pkt: pkt_input() should not report an error using the nerr() macro when the PKT tap does not need the packet. That is not an error. Use ninfo() instead. 2018-11-16 13:48:30 -06:00
Xiang Xiao
77098f8736 Move NETDEV_LATEINIT from drivers/net/Kconfig to net/Kconfig so that we can select NETDEV_LATEINIT without enabling NETDEVICES since the net driver in arch folder may need to initialize later too. 2018-11-12 06:36:26 -06:00
Gregory Nutt
d94bd49b78 net/mld: Fix a typo in conditional compilation. Clean up return values from mld_ngroups(). 2018-11-11 16:23:18 -06:00
Gregory Nutt
9b1025ca1b net/mld/mld_group.c: Fixed failure to stop queries. This turned out to be an uninitialized variable. I wonder why there was no warning from GCC? 2018-11-11 15:25:16 -06:00
Gregory Nutt
610c187e96 net/procfs/netdev_statistics.c: Eliminate warning: array subscript is above array bounds. 2018-11-11 14:28:15 -06:00
Gregory Nutt
002f09f2da net/mld: Fix logic error when testing for the case where all members have left. Still does not work. The end result is that the query timer no longer stops. Not when another another querier with a lower IP is present or when all of the members have left. Basically just can't stop querying under any condition. 2018-11-11 12:43:12 -06:00
Gregory Nutt
bfa8c362c6 net/devif/devif_loopback.c: Fix warning: implicit declaration of memcmp. 2018-11-11 11:56:37 -06:00
Gregory Nutt
8a3fc26b74 Squashed commit of the following:
The MLD implementation did not follow the RFC correctly when it is the Querier.  The Querier should use a general query and get query messages from all members of all groups.  This would be driven by a single timer per sub-nset since all groups are queried at once. Instead, the design used a Multicast Address Specific Query with one timer per group and ignores groups that we are not members of.

    Similary, the MLDv1 compatibility timer should be a single, separate timer, not a per-group timer.

    net/mld: Group may be NULL when sending a general query
2018-11-11 11:38:29 -06:00
Gregory Nutt
591b03aa7d net/mld/mld_query.c: Eliminate a warning: implicit definitino of memcmp. 2018-11-11 07:36:52 -06:00
Gregory Nutt
1a56229386 net/mld: Resolve and issue with sending reports from multiple groups in the same polling cycle. 2018-11-11 07:31:59 -06:00
Gregory Nutt
8cfb376f81 net/mld: There is an issue with the general query timer design. There should be a single instance, not a per-group instance of the timer (ditto for the v1 compatibility timer). Fall back for now and use the per-group MAX query. 2018-11-10 12:13:54 -06:00
Gregory Nutt
f8d39e2c84 net/MLD: The MAS query should be sent on the group multicast address. 2018-11-10 11:41:50 -06:00
Gregory Nutt
854046a931 /net/devif/ipv6_input.c: Correct handling of IPv6 extension headers. The main confusion was that the payload length in the IPv6 header does not include its extension headers.
net/icmpv6/icmpv6_input.c:  Correct caculation of the ICMPv6 header address
    net/mld/mld_query.c:  Correct back test for group found.
    net/mld/mld_report.c: Fix host vs. network order problem.
    net/mld/mld_send.c: Correct the address used in sending the General Query.  It should be the unspecified address in that case.
    net/mld:  Querying workaround.  The MLD implementation does not follow the RFC correct when it is the Querier.  The Querier should use a general query and get query messages from all members of all groups.  This would be driven by a single timer since all groups are queried at once.  Instead, the design currently uses a Multicast Address Specific Query with one timer per group and ignores groups that we are not members of.
2018-11-10 11:29:02 -06:00
Gregory Nutt
b0ba5b69c4 net/udp/Kconfig: Auto-select CONFIG_WQUEUE_NOTIFIER when CONFIG_UDP_READAHEAD_NOTIFIER is selected. 2018-11-10 09:43:44 -06:00
Gregory Nutt
68a115aed9 net/icmpv6/icmpv6_autoconfig.c and icmpv6_rnotify.c: Don't take the network device down when reconfiguring only the IP address from within ICMPv6 logic. Recommended by Xiang Xiao in order to avoid the long delays of bringing some networks back up.
Normally it is required that the network be in the "down" state when re-configuring the network interface.  This is thought not to be a necessary here because.

  1. The ICMPv6 logic here runs with the network locked so there can be no outgoing packets with bad source IP addresses from any asynchronous network activity using the device being reconfigured.
  2. Incoming packets depend only upon the MAC filtering.  Network drivers do not use the IP address; they filter incoming packets using only the MAC address which is not being changed here.
2018-11-10 07:13:54 -06:00
Gregory Nutt
ae29df7445 net/devif/ipv6_input.c: Remove an old, outdated comment. 2018-11-09 17:53:31 -06:00
Gregory Nutt
a583488829 net/devif/ipv6_input.c: Fix a logic error when the received IPv6 srcaddr is a multicast address. Exiting logic only supported UDP multicast. But MLD and certain other ICMPv6 packets also require acceptance of multicast packets. 2018-11-09 16:26:49 -06:00
Gregory Nutt
8527fcf4c5 net/icmpv6/icmpv6_input.c: Fix some ICMPv6 introduced with recent changes. 2018-11-09 16:10:19 -06:00
Xiang Xiao
71e1056e6d net/icmpv6, neighbor, and netdev: Rename netdev_dev_lladdrsize() to netdev_lladdrsize() and move the prototype to include/nuttx/nex/netdev.h, giving is global scope within the OS. Reviewer: This degrades the integrity of the modular architecture by introducing a new coupling via C function call. Not a good thing at all. 2018-11-09 16:05:11 -06:00
Xiang Xiao
a139b7f9b1 net/arp and icmpv6: Double the delay time on each iteration for ARP/ICMP to fight work jitter better. 2018-11-09 15:55:38 -06:00
Xiang Xiao
4f25b83f8f et/icmpv6: Remove the coupling between ICMPv6 and Ethernet by moving all Ethernet stuff to neighbor_ethernet_out.c and make the mac address as first field. 2018-11-09 15:41:23 -06:00
Xiang Xiao
a3cda3867b net/icmpv6/icmpv6_linkipaddr.c: Encapsulate the link scope address generation into icmpv6_linkipaddr() 2018-11-09 15:28:58 -06:00
Xiang Xiao
52021a5300 net/icmpv6/icmpv6_conn.c: icmpv6_free() remove reference count operation since it's already done in icmpv6_close(). 2018-11-09 15:22:25 -06:00
Xiang Xiao
688ccb156a net/icmpv6/icmpv6_neighbor.c: icmpv6_neighbor shouldn't use the out of scope variable(dripaddr) 2018-11-09 15:18:17 -06:00
Gregory Nutt
b93c3c13c4 net/: Fix some compile errors introduce with recent networking patches. Found in build testing. 2018-11-09 14:25:44 -06:00
Xiang Xiao
e294162697 net/neighbor: Support neighbor_out() for multiple link layer at the same time 2018-11-09 14:21:49 -06:00
Xiang Xiao
0a6e234962 net/neighbor: neighbor_lookup() checks if the target IP belongs to one of the local network devices. 2018-11-09 14:14:15 -06:00
Xiang Xiao
0a673d78dc net/neighbor/neighbor_dumpentry.c: Simplify neighbor_dumpentry() implementation 2018-11-09 14:10:18 -06:00
Xiang Xiao
7f8496c643 net/neighbor: Simplify the neighbor table aging process 2018-11-09 14:08:18 -06:00
Xiang Xiao
eb31dc69ac net/: Remove the unnecessary arp.h inclusion 2018-11-09 14:01:12 -06:00
Xiang Xiao
bdf93a8abf net/arp/arp_send.c: Check ifname match before sending packet 2018-11-09 13:57:16 -06:00
Xiang Xiao
43706cd797 net/arp: Redesign ARP table aging to simplify the net initialization 2018-11-09 13:54:55 -06:00
Gregory Nutt
6ca2bcb577 net/icmpv6/icmpv6_input.c: Fix yet another build issue in this file found by build testing. 2018-11-09 11:44:01 -06:00
Xiang Xiao
b8b90b5c4f net/usrsock/usrsock_accept.c: Mark newconn ready before issue accept request to avoid the event get discarded due to the socket in the invalid state 2018-11-09 11:28:19 -06:00
Xiang Xiao
44bcd2c44d net/: add NET_ICMP[v6]_NO_STACK for usrsock case 2018-11-09 11:25:57 -06:00
Xiang Xiao
26ae4176f0 net/arp and net/icmpv6: don't call d_txavail directly since it may point to NULL 2018-11-09 11:22:58 -06:00
zhangyuan7
f036e2a32a net/tcp/tcp_backlog.c: Add SOMAXCONN definition and implementaton per OpenGroup.org. 2018-11-09 11:20:33 -06:00
Xiang Xiao
d2cfd398ba Fix compiler error and warning when CONFIG_NET_SENDFILE=y 2018-11-09 11:17:43 -06:00
Gregory Nutt
9d2e6cf66a net/icmpv6/icmpv6_input.c: Fix a recently introduced error found in build testing. 2018-11-09 11:08:51 -06:00
Xiang Xiao
9e42bede2f net/udp/udp_finddev.c: Fallback to netdev_default device if the device is not found, rather than arbitrary using the device at the head of the list of devices. 2018-11-09 11:05:45 -06:00
Gregory Nutt
5340016104 net/mld: Very that the address of the group that we join is a valid IPv6 multicast address. 2018-11-08 06:37:46 -06:00
Gregory Nutt
9c3e65f15f net/mld: Fix a few compilation problems that cropped up in a different network configuration. Fix a logic error in setting the 'Other Querier Present' timer. Various cosmetic improvements. 2018-11-07 18:21:21 -06:00
Gregory Nutt
02f83334d5 Squashed commit of the following:
net/mld:  Fix a couple of places where I forgot to unlock the network in the previous commit.

    net/mld:  Implement 'Other Querier Present Timer'.  This timer is used to revert to Querier mode if there is no other querier on the network.  Also, fix some naming:  The Done message is not just Version 1 but is used with Version 2 as well.

    net/igmp:  Back out some blind, backported improvements to IGMP from MLD.  There are too many subtle differences in the protocols for this to be safe.
2018-11-07 10:40:30 -06:00
Gregory Nutt
813f4d424c net/mld: Fix a few off-by-one alignment issues spotted by tools/nxstyle. 2018-11-06 15:08:16 -06:00
Gregory Nutt
62e4a41209 net/mld: Add reference counting on the group joins. If there are multiple joins from the same group on this, the don't really leave the group until the matching number of leaves happen. Also add to hooks for the router case: Keep track of the number members NOT on this host. Integrate this with the Leave logic to that the group structure can persist while there no non-local members of the group as well. 2018-11-06 14:46:03 -06:00
Gregory Nutt
f58e7976df net/procfs: Add support to provide MLD stats at /proc/net/mld. net/mld: Fix a couple more bugs found in further MLD testing. 2018-11-06 10:42:53 -06:00
Gregory Nutt
3db3c3952b net/mld: Standard usage of debug output macros. Add configuration options to enable MLD debug even when there network debug is disabled. Add configuration option to dump the content of outgoing MLD packets. 2018-11-05 18:39:55 -06:00
Gregory Nutt
f28ed5af03 net/mld/mld_group.c: Improve error handling on a failure to allocate a new group. 2018-11-05 17:51:09 -06:00
Gregory Nutt
65c74f5444 net/mld: Fix report repitition counter. One send one less reported than required. 2018-11-05 15:17:05 -06:00