Added
Link Here
|
1 |
--- ./src/client.c.orig 2010-12-30 09:53:09.000000000 -0800 |
2 |
+++ ./src/client.c 2010-12-30 09:54:32.000000000 -0800 |
3 |
@@ -1034,15 +1034,15 @@ |
4 |
static void local_bind(CLI *c) { |
5 |
SOCKADDR_UNION addr; |
6 |
|
7 |
-#ifdef IP_TRANSPARENT |
8 |
+#ifdef IP_BINDANY |
9 |
int on=1; |
10 |
if(c->opt->option.transparent) { |
11 |
- if(setsockopt(c->fd, SOL_IP, IP_TRANSPARENT, &on, sizeof on)) |
12 |
- sockerror("setsockopt IP_TRANSPARENT"); |
13 |
+ if(setsockopt(c->fd, IPPROTO_IP, IP_BINDANY, &on, sizeof on)) |
14 |
+ sockerror("setsockopt IP_BINDANY"); |
15 |
/* ignore the error to retain Linux 2.2 compatibility */ |
16 |
/* the error will be handled by bind(), anyway */ |
17 |
} |
18 |
-#endif /* IP_TRANSPARENT */ |
19 |
+#endif /* IP_BINDANY */ |
20 |
|
21 |
memcpy(&addr, &c->bind_addr.addr[0], sizeof addr); |
22 |
if(ntohs(addr.in.sin_port)>=1024) { /* security check */ |