You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
20 lines
784 B
20 lines
784 B
--- a/src/Listener.cpp
|
|
+++ b/src/Listener.cpp
|
|
@@ -723,6 +723,7 @@ int Listener::L2_setup (void) {
|
|
|
|
// Now optimize packet flow up the raw socket
|
|
// Establish the flow BPF to forward up only "connected" packets to this raw socket
|
|
+#ifdef HAVE_IPV6
|
|
if (l->sa_family == AF_INET6) {
|
|
#ifdef HAVE_IPV6
|
|
struct in6_addr *v6peer = SockAddr_get_in6_addr(&server->peer);
|
|
@@ -740,6 +741,9 @@ int Listener::L2_setup (void) {
|
|
return -1;
|
|
#endif /* HAVE_IPV6 */
|
|
} else {
|
|
+#else
|
|
+ {
|
|
+#endif
|
|
rc = SockAddr_v4_Connect_BPF(server->mSock, ((struct sockaddr_in *)(l))->sin_addr.s_addr, ((struct sockaddr_in *)(p))->sin_addr.s_addr, ((struct sockaddr_in *)(l))->sin_port, ((struct sockaddr_in *)(p))->sin_port);
|
|
WARN_errno( rc == SOCKET_ERROR, "l2 connect ip bpf");
|
|
}
|
|
|