[driver][tun]: add tx packets dump

Signed-off-by: meijian <meijian@xiaomi.com>
This commit is contained in:
meijian 2024-05-06 18:54:11 +08:00 committed by Xiang Xiao
parent 42a23bef41
commit 667b9eabdd
1 changed files with 7 additions and 0 deletions

View File

@ -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);