You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@nuttx.apache.org by xi...@apache.org on 2021/07/26 14:32:49 UTC

[incubator-nuttx] branch master updated: drivers: wireless: Fix to set the address family for recvfrom() in gs2200m.c

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

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


The following commit(s) were added to refs/heads/master by this push:
     new b63fe51  drivers: wireless: Fix to set the address family for recvfrom() in gs2200m.c
b63fe51 is described below

commit b63fe511bbc9de16a95a7d2aa3b2cfaa241b80cb
Author: Masayuki Ishikawa <ma...@gmail.com>
AuthorDate: Mon Jul 26 17:17:52 2021 +0900

    drivers: wireless: Fix to set the address family for recvfrom() in gs2200m.c
    
    Summary:
    - I noticed that the ntpclient does not work with gs2200m
    - Finally, I found that the address family for recvfrom() is not
      set correctly
    - This commit fixes this issue
    
    Impact:
    - None
    
    Testing:
    - Tested with ntpclient
    
    Signed-off-by: Masayuki Ishikawa <Ma...@jp.sony.com>
---
 drivers/wireless/gs2200m.c | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/drivers/wireless/gs2200m.c b/drivers/wireless/gs2200m.c
index 6364c9f..e0a5bc9 100644
--- a/drivers/wireless/gs2200m.c
+++ b/drivers/wireless/gs2200m.c
@@ -666,6 +666,12 @@ errout:
 
       memcpy(&msg->addr, &pkt_dat->addr, sizeof(pkt_dat->addr));
 
+      /* Set the address family
+       * NOTE: gs2200m only supports IPv4
+       */
+
+      msg->addr.sin_family = AF_INET;
+
       /* In udp case, treat the packet separately */
 
       ret = false;