The name of loopback interface is "lo0" on BSDs.

Signed-off-by: YAMAMOTO Takashi <[email protected]>
---
 tests/atlocal.in      | 10 ++++++++++
 tests/ofproto-dpif.at |  2 +-
 2 files changed, 11 insertions(+), 1 deletion(-)

diff --git a/tests/atlocal.in b/tests/atlocal.in
index 5c0db2a..06e7384 100644
--- a/tests/atlocal.in
+++ b/tests/atlocal.in
@@ -68,3 +68,13 @@ FreeBSD)
     esac
     export MALLOC_CONF
 esac
+
+# The name of loopback interface 
+case `uname` in
+Linux)
+    LOOPBACK_INTERFACE=lo
+    ;;
+FreeBSD|NetBSD)
+    LOOPBACK_INTERFACE=lo0
+    ;;
+esac
diff --git a/tests/ofproto-dpif.at b/tests/ofproto-dpif.at
index 6d48e5a..f5b1e26 100644
--- a/tests/ofproto-dpif.at
+++ b/tests/ofproto-dpif.at
@@ -2366,7 +2366,7 @@ m4_define([CHECK_SFLOW_SAMPLING_PACKET],
      set Interface p2 options:ifindex=1003 -- \
      set Bridge br0 sflow=@sf -- \
      --id=@sf create sflow targets=\"$1:$SFLOW_PORT\" \
-       header=128 sampling=1 polling=1 agent=lo
+       header=128 sampling=1 polling=1 agent=$LOOPBACK_INTERFACE
 
   dnl open with ARP packets to seed the bridge-learning.  The output
   dnl ifIndex numbers should be reported predictably after that.
-- 
1.8.3.1

_______________________________________________
dev mailing list
[email protected]
http://openvswitch.org/mailman/listinfo/dev

Reply via email to