[glesys] Fix bug when trying to attach a ip to a server

There is a bug when trying to attach a ip to a server. This PR fixed the issue.