Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions net/inet/inet_sockif.c
Original file line number Diff line number Diff line change
Expand Up @@ -762,12 +762,14 @@ static int inet_get_socketlevel_option(FAR struct socket *psock, int option,
return -EINVAL;
}

# ifdef NET_UDP_HAVE_STACK
if (psock->s_type == SOCK_DGRAM)
{
FAR struct udp_conn_s *conn = psock->s_conn;
*(FAR int *)value = (conn->timestamp != 0);
}
else
# endif
{
return -ENOPROTOOPT;
}
Expand Down Expand Up @@ -1064,6 +1066,7 @@ static int inet_set_socketlevel_option(FAR struct socket *psock, int option,
return -EINVAL;
}

# ifdef NET_UDP_HAVE_STACK
if (psock->s_type == SOCK_DGRAM)
{
net_lock();
Expand All @@ -1079,6 +1082,7 @@ static int inet_set_socketlevel_option(FAR struct socket *psock, int option,
net_unlock();
}
else
# endif
{
return -ENOPROTOOPT;
}
Expand Down
1 change: 1 addition & 0 deletions net/pkt/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ config NET_PKT
bool "Socket packet socket support"
default n
select NETDEV_IFINDEX
select NET_READAHEAD
---help---
Enable or disable support for packet sockets.

Expand Down
Loading