lib:socket: Return early if we have only one interface