Honor bypass local gateway setting

This patch make the bypass local gateway setting works
Merge pull request #1804 from hardening/bypassLocalFix

Honor bypass local gateway setting