@@ -191,7 +191,7 @@ func (s *udpService) Serve(clientConn net.PacketConn) error {
191191 }
192192
193193 var onetErr * onet.ConnectionError
194- if payload , tgtUDPAddr , onetErr = s .parsePacket (textData ); onetErr != nil {
194+ if payload , tgtUDPAddr , onetErr = s .validatePacket (textData ); onetErr != nil {
195195 return onetErr
196196 }
197197
@@ -209,7 +209,7 @@ func (s *udpService) Serve(clientConn net.PacketConn) error {
209209 }
210210
211211 var onetErr * onet.ConnectionError
212- if payload , tgtUDPAddr , onetErr = s .parsePacket (textData ); onetErr != nil {
212+ if payload , tgtUDPAddr , onetErr = s .validatePacket (textData ); onetErr != nil {
213213 return onetErr
214214 }
215215 }
@@ -229,7 +229,7 @@ func (s *udpService) Serve(clientConn net.PacketConn) error {
229229// Given the decrypted contents of a UDP packet, return
230230// the payload and the destination address, or an error if
231231// this packet cannot or should not be forwarded.
232- func (s * udpService ) parsePacket (textData []byte ) ([]byte , * net.UDPAddr , * onet.ConnectionError ) {
232+ func (s * udpService ) validatePacket (textData []byte ) ([]byte , * net.UDPAddr , * onet.ConnectionError ) {
233233 tgtAddr := socks .SplitAddr (textData )
234234 if tgtAddr == nil {
235235 return nil , nil , onet .NewConnectionError ("ERR_READ_ADDRESS" , "Failed to get target address" , nil )
0 commit comments