Fix incorrect check for gateway port existance.

Change-Id: I7c386c8433d49d34e9cc9c71ebc3a6281e7433ad