The name of loopback interface is "lo0" on BSDs.
Signed-off-by: YAMAMOTO Takashi <yamamoto@valinux.co.jp>
Signed-off-by: Ben Pfaff <blp@nicira.com>
esac
export MALLOC_CONF
esac
+
+# The name of loopback interface
+case `uname` in
+Linux)
+ LOOPBACK_INTERFACE=lo
+ ;;
+FreeBSD|NetBSD)
+ LOOPBACK_INTERFACE=lo0
+ ;;
+esac
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.