[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[UNIKRAFT PATCH v2 08/15] plat/tap: Get promiscuous mode



The patch implements function to check for promiscuous mode on the
uk_netdev.

Signed-off-by: Sharan Santhanam <sharan.santhanam@xxxxxxxxx>
---
 plat/drivers/tap/tap.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/plat/drivers/tap/tap.c b/plat/drivers/tap/tap.c
index 1345475..f8219eb 100644
--- a/plat/drivers/tap/tap.c
+++ b/plat/drivers/tap/tap.c
@@ -319,10 +319,12 @@ static void tap_netdev_info_get(struct uk_netdev *dev 
__unused,
 
 static unsigned int tap_netdev_promisc_get(struct uk_netdev *n)
 {
+       struct tap_net_dev *tdev;
 
        UK_ASSERT(n);
+       tdev = to_tapnetdev(n);
 
-       return 0;
+       return tdev->promisc;
 }
 
 static __u16 tap_netdev_mtu_get(struct uk_netdev *n)
-- 
2.7.4




 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.