IP_TTL socket option is defined on some systems that don't have SOL_IP.
Use IPPROTO_IP in this case.
---
 src/proto_tcp.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/src/proto_tcp.c b/src/proto_tcp.c
index f698889..3642398 100644
--- a/src/proto_tcp.c
+++ b/src/proto_tcp.c
@@ -1456,7 +1456,11 @@ static enum act_return 
tcp_exec_action_silent_drop(struct act_rule *rule, struct
         * network and has no effect on local net.
         */
 #ifdef IP_TTL
+#ifdef SOL_IP
        setsockopt(conn->t.sock.fd, SOL_IP, IP_TTL, &one, sizeof(one));
+#else
+       setsockopt(conn->t.sock.fd, IPPROTO_IP, IP_TTL, &one, sizeof(one));
+#endif
 #endif
  out:
        /* kill the stream if any */
-- 
2.3.6


Reply via email to