You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@nuttx.apache.org by gn...@apache.org on 2019/12/24 16:46:27 UTC

[incubator-nuttx] branch dev updated (e600d29 -> 86cdfd5)

This is an automated email from the ASF dual-hosted git repository.

gnutt pushed a change to branch dev
in repository https://gitbox.apache.org/repos/asf/incubator-nuttx.git.


    omit e600d29  Merge pull request #7 from xiaoxiang781216/fix_conn_addr_any
    omit bcd85f9  tcp_conn: Check if the remote address is unspecified
     add 87cf5c5  Correct some problems with network timed events when there are multiple network devices in the configuration.
     new 86cdfd5  tcp_conn: Check if the remote address is unspecified

This update added new revisions after undoing existing revisions.
That is to say, some revisions that were in the old version of the
branch are not in the new version.  This situation occurs
when a user --force pushes a change and generates a repository
containing something like this:

 * -- * -- B -- O -- O -- O   (e600d29)
            \
             N -- N -- N   refs/heads/dev (86cdfd5)

You should already have received notification emails for all of the O
revisions, and so the following emails describe only the N revisions
from the common base, B.

Any revisions marked "omit" are not gone; other references still
refer to them.  Any revisions marked "discard" are gone forever.

The 1 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


Summary of changes:
 arch/arm/src/c5471/c5471_ethernet.c               |   2 +-
 arch/arm/src/imxrt/imxrt_enet.c                   |   2 +-
 arch/arm/src/kinetis/kinetis_enet.c               |   2 +-
 arch/arm/src/lpc17xx_40xx/lpc17_40_ethernet.c     |   2 +-
 arch/arm/src/lpc43xx/lpc43_ethernet.c             |   2 +-
 arch/arm/src/lpc54xx/lpc54_ethernet.c             |   2 +-
 arch/arm/src/s32k1xx/s32k1xx_enet.c               |   2 +-
 arch/arm/src/sam34/sam_emac.c                     |   2 +-
 arch/arm/src/sama5/sam_emaca.c                    |   2 +-
 arch/arm/src/sama5/sam_emacb.c                    |   2 +-
 arch/arm/src/sama5/sam_gmac.c                     |   2 +-
 arch/arm/src/samv7/sam_emac.c                     |   2 +-
 arch/arm/src/stm32/stm32_eth.c                    |   2 +-
 arch/arm/src/stm32f7/stm32_ethernet.c             |   2 +-
 arch/arm/src/stm32h7/stm32_ethernet.c             |   2 +-
 arch/arm/src/tiva/lm/lm3s_ethernet.c              |   2 +-
 arch/arm/src/tiva/tm4c/tm4c_ethernet.c            |   2 +-
 arch/hc/src/m9s12/m9s12_ethernet.c                |   2 +-
 arch/mips/src/pic32mx/pic32mx-ethernet.c          |  19 ++-
 arch/mips/src/pic32mz/pic32mz-ethernet.c          |   2 +-
 arch/misoc/src/common/misoc_net.c                 |  41 +++---
 arch/renesas/src/rx65n/rx65n_eth.c                |  56 +++++---
 arch/sim/src/sim/up_netdriver.c                   |  12 +-
 arch/z80/src/ez80/ez80_emac.c                     | 156 +++++++++++++---------
 drivers/net/dm90x0.c                              |   2 +-
 drivers/net/enc28j60.c                            |   2 +-
 drivers/net/encx24j600.c                          |   2 +-
 drivers/net/ftmac100.c                            |   2 +-
 drivers/net/lan91c111.c                           |   2 +-
 drivers/net/loopback.c                            |   2 +-
 drivers/net/rpmsgdrv.c                            |   2 +-
 drivers/net/skeleton.c                            |   2 +-
 drivers/net/slip.c                                |   2 +-
 drivers/net/tun.c                                 |   2 +-
 drivers/usbdev/cdcecm.c                           |  66 +++++----
 drivers/usbdev/rndis.c                            | 114 ++++++++++------
 drivers/wireless/ieee80211/bcm43xxx/bcmf_netdev.c |   2 +-
 drivers/wireless/ieee802154/xbee/xbee_netdev.c    |   2 +-
 drivers/wireless/spirit/drivers/spirit_netdev.c   |   2 +-
 include/nuttx/net/netdev.h                        |   3 +-
 net/devif/devif.h                                 |   4 -
 net/devif/devif_initialize.c                      |   7 -
 net/devif/devif_poll.c                            |  60 ++-------
 wireless/bluetooth/bt_netdev.c                    |   4 +-
 wireless/ieee802154/mac802154_loopback.c          |   3 +-
 wireless/ieee802154/mac802154_netdev.c            |   4 +-
 wireless/pktradio/pktradio_loopback.c             |   2 +-
 47 files changed, 340 insertions(+), 275 deletions(-)


[incubator-nuttx] 01/01: tcp_conn: Check if the remote address is unspecified

Posted by gn...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

gnutt pushed a commit to branch dev
in repository https://gitbox.apache.org/repos/asf/incubator-nuttx.git

commit 86cdfd59a0f7000386ef271eef1df571dbbbfd78
Author: chao.an <an...@xiaomi.com>
AuthorDate: Tue Dec 24 18:00:54 2019 +0800

    tcp_conn: Check if the remote address is unspecified
    
    Change-Id: I6f547bb4bfb3bb621573db9097a531ce2260e794
    Signed-off-by: chao.an <an...@xiaomi.com>
---
 net/tcp/tcp_finddev.c | 17 +++++++++--------
 1 file changed, 9 insertions(+), 8 deletions(-)

diff --git a/net/tcp/tcp_finddev.c b/net/tcp/tcp_finddev.c
index ed4cfc9..581ac72 100644
--- a/net/tcp/tcp_finddev.c
+++ b/net/tcp/tcp_finddev.c
@@ -71,7 +71,8 @@
  ****************************************************************************/
 
 #ifdef CONFIG_NET_IPv4
-static int tcp_find_ipv4_device(FAR struct tcp_conn_s *conn, in_addr_t addr)
+static int tcp_find_ipv4_device(FAR struct tcp_conn_s *conn,
+                                in_addr_t addr, bool local)
 {
   /* Do nothing if a device is already bound to the connection */
 
@@ -88,7 +89,7 @@ static int tcp_find_ipv4_device(FAR struct tcp_conn_s *conn, in_addr_t addr)
 
   if (net_ipv4addr_cmp(addr, INADDR_ANY))
     {
-      return OK;
+      return local ? OK : -EINVAL;
     }
 
   /* We need to select the device that is going to route the TCP packet
@@ -121,7 +122,7 @@ static int tcp_find_ipv4_device(FAR struct tcp_conn_s *conn, in_addr_t addr)
 
 #ifdef CONFIG_NET_IPv6
 static int tcp_find_ipv6_device(FAR struct tcp_conn_s *conn,
-                                const net_ipv6addr_t addr)
+                                const net_ipv6addr_t addr, bool local)
 {
   /* Do nothing if a device is already bound to the connection */
 
@@ -138,7 +139,7 @@ static int tcp_find_ipv6_device(FAR struct tcp_conn_s *conn,
 
   if (net_ipv6addr_cmp(addr, g_ipv6_unspecaddr))
     {
-      return OK;
+      return local ? OK : -EINVAL;
     }
 
   /* We need to select the device that is going to route the TCP packet
@@ -177,7 +178,7 @@ static int tcp_find_ipv6_device(FAR struct tcp_conn_s *conn,
 #ifdef CONFIG_NET_IPv4
 int tcp_local_ipv4_device(FAR struct tcp_conn_s *conn)
 {
-  return tcp_find_ipv4_device(conn, conn->u.ipv4.laddr);
+  return tcp_find_ipv4_device(conn, conn->u.ipv4.laddr, true);
 }
 #endif /* CONFIG_NET_IPv4 */
 
@@ -201,7 +202,7 @@ int tcp_local_ipv4_device(FAR struct tcp_conn_s *conn)
 #ifdef CONFIG_NET_IPv4
 int tcp_remote_ipv4_device(FAR struct tcp_conn_s *conn)
 {
-  return tcp_find_ipv4_device(conn, conn->u.ipv4.raddr);
+  return tcp_find_ipv4_device(conn, conn->u.ipv4.raddr, false);
 }
 #endif
 
@@ -224,7 +225,7 @@ int tcp_remote_ipv4_device(FAR struct tcp_conn_s *conn)
 #ifdef CONFIG_NET_IPv6
 int tcp_local_ipv6_device(FAR struct tcp_conn_s *conn)
 {
-  return tcp_find_ipv6_device(conn, conn->u.ipv6.laddr);
+  return tcp_find_ipv6_device(conn, conn->u.ipv6.laddr, true);
 }
 #endif /* CONFIG_NET_IPv6 */
 
@@ -248,7 +249,7 @@ int tcp_local_ipv6_device(FAR struct tcp_conn_s *conn)
 #ifdef CONFIG_NET_IPv6
 int tcp_remote_ipv6_device(FAR struct tcp_conn_s *conn)
 {
-  return tcp_find_ipv6_device(conn, conn->u.ipv6.raddr);
+  return tcp_find_ipv6_device(conn, conn->u.ipv6.raddr, false);
 }
 #endif /* CONFIG_NET_IPv6 */