From 87a9e4379e748471657c50f0994fba92b9aa1253 Mon Sep 17 00:00:00 2001 From: Luigi Rizzo Date: Fri, 6 Apr 2012 14:26:05 +0000 Subject: [PATCH] we need to specify a NETMAP_API version or the ioctl() will fail. --- tools/tools/netmap/pcap.c | 1 + 1 file changed, 1 insertion(+) diff --git a/tools/tools/netmap/pcap.c b/tools/tools/netmap/pcap.c index 2a93e82c7f55..06bb1731df23 100644 --- a/tools/tools/netmap/pcap.c +++ b/tools/tools/netmap/pcap.c @@ -232,6 +232,7 @@ netmap_open(struct my_ring *me, int ringid) bzero(&req, sizeof(req)); strncpy(req.nr_name, me->nmr.nr_name, sizeof(req.nr_name)); req.nr_ringid = ringid; + req.nr_version = NETMAP_API; err = ioctl(fd, NIOCGINFO, &req); if (err) { D("cannot get info on %s", me->nmr.nr_name);