From a1e90736b47fcf123828d40084adf5599a387aed Mon Sep 17 00:00:00 2001
From: root <yili@winhong.com>
Date: Sat, 9 May 2015 10:26:00 -0400
Subject: [PATCH] Check vif interface error at kernel 3.x issue

The softlink name of /sys/class/net/vif**/device have not the xen-backend string
on kernel 3.X, should use the softlink /sys/class/net/vif**/device/driver

Signed-off-by: Yi Li <yili@winhong.com>
---
 ocaml/network/network_utils.ml | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/ocaml/network/network_utils.ml b/ocaml/network/network_utils.ml
index 281157d..9195f01 100644
--- a/ocaml/network/network_utils.ml
+++ b/ocaml/network/network_utils.ml
@@ -86,7 +86,7 @@ module Sysfs = struct
 
 	let is_physical name =
 		try
-			let link = Unix.readlink (getpath name "device") in
+			let link = Unix.readlink (getpath name "device/driver") in
 			(* filter out device symlinks which look like /../../../devices/xen-backend/vif- *)
 			not(List.mem "xen-backend" (String.split '/' link))
 		with _ -> false
-- 
1.7.12.4

