Set $interfacegw properly and avoid losing default route in some circumstances