Current no_proxy setting works fine for default qemu network settings.
It contains network 10.0.0.0/16, which should include host address and
enable communication with host.
But it doesn't work for zypper. Zypper respects no_proxy variable, but
accepts only host addresses, not network addresses. To enable local zypper
repo from host, it is required to add host address to no_proxy explicitly.
Change-Id: I0ee189ea952d9c7b12f169abd7bd0364d5a30aee
Signed-off-by: Rafal Krypa <r.krypa@samsung.com>
__proxy=`cmd_get socks_proxy`
[ -n "${__proxy}" ] && "socks_proxy=socks://${__proxy}/"
-export "no_proxy=localhost,127.0.0.1/8,10.0.0.0/16"
+no_proxy="localhost,127.0.0.1/8,10.0.0.0/16"
+
+# Work around for bug in zypper, not handling netmasks in no_proxy.
+# Exlicitly add default gateway ip to no_proxy.
+__gw=`cmd_get ip | cut -d: -f3`
+[ -n "${__gw}" ] && no_proxy="${no_proxy},${__gw}"
+
+export no_proxy