Skip to content
Snippets Groups Projects
Commit dcff2bda authored by Michael Gernoth's avatar Michael Gernoth
Browse files

Determine IP version on the basis of the source address

This allows to "tunnel" IPv6 connections in IPv4 connections between
haproxy and go-mmproxy.
parent 0344410c
No related branches found
No related tags found
No related merge requests found
......@@ -51,7 +51,7 @@ func tcpHandleConnection(conn net.Conn, logger *zap.Logger) {
}
targetAddr := Opts.TargetAddr6
if AddrVersion(conn.RemoteAddr()) == 4 {
if AddrVersion(saddr) == 4 {
targetAddr = Opts.TargetAddr4
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment