From 6513f3374977798df32396d991a2a429dac10153 Mon Sep 17 00:00:00 2001 From: David Scott Date: Mon, 23 May 2016 18:18:32 +0100 Subject: [PATCH] Hyper-V: mount the filesystem from the default gateway via eth0 When running in VPN mode eth0 and eth1 have default routes, but eth1 has the lowest metric. However the host CIFS server can only be contacted via eth0, so always use the eth0 address. Signed-off-by: David Scott --- alpine/packages/hvtools/src/hv_kvp_daemon.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/alpine/packages/hvtools/src/hv_kvp_daemon.c b/alpine/packages/hvtools/src/hv_kvp_daemon.c index 045418465..4ae991118 100644 --- a/alpine/packages/hvtools/src/hv_kvp_daemon.c +++ b/alpine/packages/hvtools/src/hv_kvp_daemon.c @@ -377,7 +377,7 @@ static int kvp_cifs_mount(const char *value) char *t; char gw[256]; - char gwcmd[] = "ip route show | awk '/default/ {print $3 }'"; + char gwcmd[] = "ip route show | grep 'eth0' | awk '/default/ {print $3 }'"; int i, count;