diff --git a/net/pkt/Kconfig b/net/pkt/Kconfig index ae9c7891f5..147933d1ad 100644 --- a/net/pkt/Kconfig +++ b/net/pkt/Kconfig @@ -8,6 +8,7 @@ menu "Raw Socket Support" config NET_PKT bool "Socket packet socket support" default n + depends on NET_ETHERNET || EXPERIMENTAL ---help--- Enable or disable support for packet sockets. @@ -17,6 +18,8 @@ config NET_PKT a packet socket will bypass the network altogether and be placed in the transmission buffer of the network interface driver. + REVISIT: Currently only implemented for Ethernet. + if NET_PKT config NET_PKT_CONNS diff --git a/net/pkt/pkt_poll.c b/net/pkt/pkt_poll.c index c289b146d8..fe195148af 100644 --- a/net/pkt/pkt_poll.c +++ b/net/pkt/pkt_poll.c @@ -86,7 +86,7 @@ void pkt_poll(FAR struct net_driver_s *dev, FAR struct pkt_conn_s *conn) { /* Setup for the application callback */ - dev->d_appdata = &dev->d_buf[NET_LL_HDRLEN(dev) + IPv4UDP_HDRLEN]; + dev->d_appdata = &dev->d_buf[NET_LL_HDRLEN(dev)]; dev->d_len = 0; dev->d_sndlen = 0; diff --git a/net/socket/bind.c b/net/socket/bind.c index 8d7270aee1..b2c3382255 100644 --- a/net/socket/bind.c +++ b/net/socket/bind.c @@ -92,9 +92,6 @@ int psock_bind(FAR struct socket *psock, const struct sockaddr *addr, socklen_t addrlen) { -#ifdef CONFIG_NET_PKT - FAR const struct sockaddr_ll *lladdr = (const struct sockaddr_ll *)addr; -#endif int errcode; int ret = OK;