Detecting errors in connectionless protocols