a more proper default nic selection criteria

look at all interfaces that ip link shows as being up, then filter
them for ^e or ^p devices. Should hold even after the bridges get
built.

Change-Id: If6b1e623f9d146c2430dc8a4a007997290b90846
diff --git a/lib/nova b/lib/nova
index 722eabb..0163aa6 100644
--- a/lib/nova
+++ b/lib/nova
@@ -81,7 +81,12 @@
 # the new p* interfaces, then basically picks the first
 # alphabetically. It's probably wrong, however it's less wrong than
 # always using 'eth0' which doesn't exist on new Linux distros at all.
-GUEST_INTERFACE_DEFAULT=$(route -n | awk '{print $8}' | grep ^[ep] | sort | head -1)
+GUEST_INTERFACE_DEFAULT=$(ip link \
+    | grep 'state UP' \
+    | awk '{print $2}' \
+    | sed 's/://' \
+    | grep ^[ep] \
+    | head -1)
 
 # Get hypervisor configuration
 # ----------------------------