diff options
author | Johannes Stezenbach <js@sig21.net> | 2011-09-08 15:39:15 +0200 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2011-11-07 12:32:19 -0800 |
commit | 584025553b65c1d4341f5da2971ad9baff9995cf (patch) | |
tree | e197985f2a4a086a10926db7d8357a1770ec6839 | |
parent | f3127ac1a59d00140b9ed845c0ca787e92c8af27 (diff) | |
download | lwn-584025553b65c1d4341f5da2971ad9baff9995cf.tar.gz lwn-584025553b65c1d4341f5da2971ad9baff9995cf.zip |
usbmon vs. tcpdump: fix dropped packet count
commit 236c448cb6e7f82096101e1ace4b77f8b38f82c8 upstream.
Report the number of dropped packets instead of zero
when using the binary usbmon interface with tcpdump.
# tcpdump -i usbmon1 -w dump
tcpdump: listening on usbmon1, link-type USB_LINUX_MMAPPED (USB with padded Linux header), capture size 65535 bytes
^C2155 packets captured
2155 packets received by filter
1019 packets dropped by kernel
Signed-off-by: Johannes Stezenbach <js@sig21.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
-rw-r--r-- | drivers/usb/mon/mon_bin.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/usb/mon/mon_bin.c b/drivers/usb/mon/mon_bin.c index 9231b25d725a..f74f18258bd4 100644 --- a/drivers/usb/mon/mon_bin.c +++ b/drivers/usb/mon/mon_bin.c @@ -1041,7 +1041,7 @@ static int mon_bin_ioctl(struct inode *inode, struct file *file, nevents = mon_bin_queued(rp); sp = (struct mon_bin_stats __user *)arg; - if (put_user(rp->cnt_lost, &sp->dropped)) + if (put_user(ndropped, &sp->dropped)) return -EFAULT; if (put_user(nevents, &sp->queued)) return -EFAULT; |