Fixed goes_to_gw, is_from_gw and dr_is_gw so that they accept negative
gateway types ( to match all gw types)
(cherry picked from commit 3bfd505b72d46ea31930efe31b52e3bd5ea477de)