mirror of
https://github.com/openwrt/openwrt.git
synced 2024-12-27 01:11:14 +00:00
02d4d36d4b
The removed patches are already integrated in the upstream version. Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
21 lines
784 B
Diff
21 lines
784 B
Diff
--- 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");
|
|
}
|