Add if statement for gateway when update routing table