You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
UDP Protocol seems using nf_conntrack table.
If a record in nf_conntrack is same source port(8301) and destination port(8301), host server assume that the connection is made.
container -> host -> other server
if a client sent a packet to other server like above, a conntrack record will be created and host server assume that udp stream is created.
And if other server sends a packet to the host, the packet will be sent to container because of host server's nf_conntrack even if there is no binding port.
In this case, we are not able to use bridge network in docker because sometimes if container ip changes, it will fail.
I wanna suggest a solution in this case.
In net_transport.go, memberlist reuses udp listener to send the payload.
In NetTransport struct, we can have udpSenders []*net.UDPConn.
In this case, sender might be created using random port like udpSender, err := net.ListenUDP("udp", nil)
If this kind of implementaion is done, we can deploy consul client in docker environment. And all connection can be done because the payload always have source ip and port.
The text was updated successfully, but these errors were encountered:
This might be related with docker udp issues in Consul.
hashicorp/docker-consul#60
UDP Protocol seems using nf_conntrack table.
If a record in nf_conntrack is same source port(8301) and destination port(8301), host server assume that the connection is made.
container -> host -> other server
if a client sent a packet to other server like above, a conntrack record will be created and host server assume that udp stream is created.
And if other server sends a packet to the host, the packet will be sent to container because of host server's nf_conntrack even if there is no binding port.
In this case, we are not able to use bridge network in docker because sometimes if container ip changes, it will fail.
I wanna suggest a solution in this case.
In net_transport.go, memberlist reuses udp listener to send the payload.
memberlist/net_transport.go
Line 204 in 3f82dc1
I think it can be better there is an option that can separate udp sender and listener.
memberlist/net_transport.go
Lines 49 to 60 in 3f82dc1
In NetTransport struct, we can have
udpSenders []*net.UDPConn
.In this case, sender might be created using random port like
udpSender, err := net.ListenUDP("udp", nil)
If this kind of implementaion is done, we can deploy consul client in docker environment. And all connection can be done because the payload always have source ip and port.
The text was updated successfully, but these errors were encountered: