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/nuttx.git


The following commit(s) were added to refs/heads/master by this push:
     new 667b9eabdd [driver][tun]: add tx packets dump
667b9eabdd is described below

commit 667b9eabddc5d792bcd12fdc144eebdf3dc45867
Author: meijian <[email protected]>
AuthorDate: Mon May 6 18:54:11 2024 +0800

    [driver][tun]: add tx packets dump
    
    Signed-off-by: meijian <[email protected]>
---
 drivers/net/tun.c | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/drivers/net/tun.c b/drivers/net/tun.c
index 43067cfb19..9a81cd7e10 100644
--- a/drivers/net/tun.c
+++ b/drivers/net/tun.c
@@ -306,6 +306,13 @@ static int tun_txpoll(FAR struct net_driver_s *dev)
   int ret;
 
   DEBUGASSERT(priv->read_buf == NULL);
+
+#ifdef CONFIG_NET_PKT
+  /* When packet sockets are enabled, feed the frame into the tap */
+
+  pkt_input(dev);
+#endif
+
   priv->read_d_len = dev->d_len;
   priv->read_buf   = dev->d_iob;
   netdev_iob_clear(dev);

Reply via email to