Skip to content

Commit

Permalink
[driver][tun]: add tx packets dump
Browse files Browse the repository at this point in the history
Signed-off-by: meijian <meijian@xiaomi.com>
  • Loading branch information
Meissi-jian authored and xiaoxiang781216 committed May 14, 2024
1 parent 42a23be commit 667b9ea
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions drivers/net/tun.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit 667b9ea

Please sign in to comment.