Skip to content

Commit

Permalink
stdio_udp: allow binding to a specific interface only
Browse files Browse the repository at this point in the history
  • Loading branch information
benpicco committed Oct 18, 2024
1 parent ed052ec commit 32838cd
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion sys/stdio_udp/stdio_udp.c
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,10 @@
#define CONFIG_STDIO_UDP_PORT 2323
#endif

#ifndef CONFIG_STDIO_UDP_NETIF
#define CONFIG_STDIO_UDP_NETIF SOCK_ADDR_ANY_NETIF
#endif

#ifndef EOT
#define EOT 0x4
#endif
Expand Down Expand Up @@ -64,7 +68,7 @@ static void _init(void)
{
const sock_udp_ep_t local = {
.family = AF_INET6,
.netif = SOCK_ADDR_ANY_NETIF,
.netif = CONFIG_STDIO_UDP_NETIF,
.port = CONFIG_STDIO_UDP_PORT,
};

Expand Down

0 comments on commit 32838cd

Please sign in to comment.