netdev: update IFF_LOOPBACK flag for linux and bsd devices
authorAlexandru Copot <alex.mihai.c@gmail.com>
Sat, 7 Sep 2013 09:35:14 +0000 (12:35 +0300)
committerBen Pfaff <blp@nicira.com>
Sat, 7 Sep 2013 16:33:51 +0000 (09:33 -0700)
Signed-off-by: Alexandru Copot <alex.mihai.c@gmail.com>
Signed-off-by: Ben Pfaff <blp@nicira.com>
AUTHORS
lib/netdev-bsd.c
lib/netdev-linux.c

diff --git a/AUTHORS b/AUTHORS
index a708fb2..d416160 100644 (file)
--- a/AUTHORS
+++ b/AUTHORS
@@ -2,6 +2,7 @@ The following people, in alphabetical order, have either authored or
 signed off on commits in the Open vSwitch version control repository.
 
 Aaron Rosen             arosen@clemson.edu
+Alexandru Copot         alex.mihai.c@gmail.com
 Alexey I. Froloff       raorn@altlinux.org
 Alex Wang               alexw@nicira.com
 Andrew Evans            aevans@nicira.com
index fdea10b..3eb29ea 100644 (file)
@@ -1428,6 +1428,9 @@ nd_to_iff_flags(enum netdev_flags nd)
         iff |= IFF_PPROMISC;
 #endif
     }
+    if (nd & NETDEV_LOOPBACK) {
+        iff |= IFF_LOOPBACK;
+    }
     return iff;
 }
 
@@ -1441,6 +1444,9 @@ iff_to_nd_flags(int iff)
     if (iff & IFF_PROMISC) {
         nd |= NETDEV_PROMISC;
     }
+    if (iff & IFF_LOOPBACK) {
+        nd |= NETDEV_LOOPBACK;
+    }
     return nd;
 }
 
index 26fb32d..2752623 100644 (file)
@@ -2510,6 +2510,9 @@ nd_to_iff_flags(enum netdev_flags nd)
     if (nd & NETDEV_PROMISC) {
         iff |= IFF_PROMISC;
     }
+    if (nd & NETDEV_LOOPBACK) {
+        iff |= IFF_LOOPBACK;
+    }
     return iff;
 }
 
@@ -2523,6 +2526,9 @@ iff_to_nd_flags(int iff)
     if (iff & IFF_PROMISC) {
         nd |= NETDEV_PROMISC;
     }
+    if (iff & IFF_LOOPBACK) {
+        nd |= NETDEV_LOOPBACK;
+    }
     return nd;
 }