Compact-port routing models and applications to distance-hereditary graphs