Cleaner and reduces the overall Comm API.
IPv6 update had incorrectly interpreted comm_open flags as ai_flags.
(same context, different actual name/values)
#endif /* sockopt */
}
+/**
+ * Set the socket IP_TRANSPARENT option for Linux TPROXY v4 support.
+ */
void
comm_set_transparent(int fd)
{
#if LINUX_TPROXY4
if((flags & COMM_TRANSPARENT)) {
comm_set_transparent(new_socket);
- F->flags.transparent = 1;
}
#endif
commSetNonBlocking(sock);
#if LINUX_TPROXY4
- /* AYJ: do we need to set this again on every accept? */
+ /* AYJ: do we actually need to set this again on every accept? */
if(fd_table[fd].flags.transparent == 1) {
comm_set_transparent(sock);
F->flags.transparent = 1;
SQUIDCEXTERN u_short comm_local_port(int fd);
SQUIDCEXTERN int comm_set_tos(int fd, int tos);
-/**
- * Set the socket IP_TRANSPARENT option for Linux TPROXY v4 support.
- */
-SQUIDCEXTERN void comm_set_transparent(int fd);
-
SQUIDCEXTERN void commSetSelect(int, unsigned int, PF *, void *, time_t);
SQUIDCEXTERN void commResetSelect(int);
hierarchyNote(&request->hier, fs->code, fs->_peer->host);
} else {
-#if LINUX_TPROXY2 || LINUX_TPROXY4
-
+#if LINUX_TPROXY2
if (request->flags.tproxy) {
-
-#if LINUX_TPROXY4
- comm_set_transparent(fd);
-
-#elif LINUX_TPROXY2
IPAddress addr;
src.GetInAddr(itp.v.addr.faddr);