Use new ChannelData.encode(pad)

Padding is mandatory for TCP and TLS
See https://tools.ietf.org/html/rfc5766#section-11.5

Signed-off-by: Etienne CHAMPETIER <champetier.etienne@gmail.com>
This commit is contained in:
Etienne CHAMPETIER 2016-04-25 11:38:08 +02:00
parent d33d8b87e4
commit 84bd07c665

View File

@ -587,7 +587,9 @@ class NetAccessManager
throws IllegalArgumentException, throws IllegalArgumentException,
IOException, StunException IOException, StunException
{ {
sendMessage(channelData.encode(), srcAddr, remoteAddr); boolean pad = srcAddr.getTransport() == Transport.TCP
|| srcAddr.getTransport() == Transport.TLS;
sendMessage(channelData.encode(pad), srcAddr, remoteAddr);
} }
/** /**