diff options
Diffstat (limited to 'openbsc/src/ipaccess')
-rw-r--r-- | openbsc/src/ipaccess/ipaccess-find.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/openbsc/src/ipaccess/ipaccess-find.c b/openbsc/src/ipaccess/ipaccess-find.c index bb9819ed1..c8de157b9 100644 --- a/openbsc/src/ipaccess/ipaccess-find.c +++ b/openbsc/src/ipaccess/ipaccess-find.c @@ -41,8 +41,13 @@ static int udp_sock(const char *ifname) return fd; if (ifname) { +#ifdef __FreeBSD__ + rc = setsockopt(fd, SOL_SOCKET, IP_RECVIF, ifname, + strlen(ifname)); +#else rc = setsockopt(fd, SOL_SOCKET, SO_BINDTODEVICE, ifname, strlen(ifname)); +#endif if (rc < 0) goto err; } |