gateway: refactor olsr_set_inet_gateway