@@ -191,7 +191,7 @@ func (s *udpService) Serve(clientConn net.PacketConn) error {
191
191
}
192
192
193
193
var onetErr * onet.ConnectionError
194
- if payload , tgtUDPAddr , onetErr = s .parsePacket (textData ); onetErr != nil {
194
+ if payload , tgtUDPAddr , onetErr = s .validatePacket (textData ); onetErr != nil {
195
195
return onetErr
196
196
}
197
197
@@ -209,7 +209,7 @@ func (s *udpService) Serve(clientConn net.PacketConn) error {
209
209
}
210
210
211
211
var onetErr * onet.ConnectionError
212
- if payload , tgtUDPAddr , onetErr = s .parsePacket (textData ); onetErr != nil {
212
+ if payload , tgtUDPAddr , onetErr = s .validatePacket (textData ); onetErr != nil {
213
213
return onetErr
214
214
}
215
215
}
@@ -229,7 +229,7 @@ func (s *udpService) Serve(clientConn net.PacketConn) error {
229
229
// Given the decrypted contents of a UDP packet, return
230
230
// the payload and the destination address, or an error if
231
231
// 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 ) {
233
233
tgtAddr := socks .SplitAddr (textData )
234
234
if tgtAddr == nil {
235
235
return nil , nil , onet .NewConnectionError ("ERR_READ_ADDRESS" , "Failed to get target address" , nil )
0 commit comments