Fix UDP sockets creation.