From 6f70a4d5ef88972c8f5008b48791cbe1ae943141 Mon Sep 17 00:00:00 2001 From: Darafei Praliaskouski Date: Fri, 8 May 2026 01:50:58 +0400 Subject: [PATCH] fix(packet): retain bind-to-device capability --- packet/construct_unix.c | 4 +--- packet/packet.c | 3 +++ 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/packet/construct_unix.c b/packet/construct_unix.c index f86fd52..6362c1a 100644 --- a/packet/construct_unix.c +++ b/packet/construct_unix.c @@ -882,9 +882,7 @@ int construct_ip6_packet( #ifdef SO_BINDTODEVICE if (param->local_device) { - if (setsockopt(send_socket, - SOL_SOCKET, SO_BINDTODEVICE, param->local_device, - strlen(param->local_device))) { + if (set_bind_to_device(send_socket, param->local_device)) { return -1; } } diff --git a/packet/packet.c b/packet/packet.c index 5f3a39b..9721b5b 100644 --- a/packet/packet.c +++ b/packet/packet.c @@ -28,6 +28,9 @@ #include #include #include +#ifdef HAVE_SYS_SOCKET_H +#include +#endif #ifdef HAVE_LIBCAP #include -- 2.47.3