diff options
author | Johannes Stezenbach <js@sig21.net> | 2011-09-08 09:39:15 -0400 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2011-09-26 18:36:07 -0400 |
commit | 236c448cb6e7f82096101e1ace4b77f8b38f82c8 (patch) | |
tree | 70d26dd2488f78fa9c77a52fe54461f7917b0084 /drivers/usb | |
parent | 865569ba5a8b0cc840e2b9c16ca6b42d6d5306b4 (diff) |
usbmon vs. tcpdump: fix dropped packet count
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>
Cc: stable <stable@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers/usb')
-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 a09dbd243eb3..a04b2ff9dd83 100644 --- a/drivers/usb/mon/mon_bin.c +++ b/drivers/usb/mon/mon_bin.c | |||
@@ -1101,7 +1101,7 @@ static long mon_bin_ioctl(struct file *file, unsigned int cmd, unsigned long arg | |||
1101 | nevents = mon_bin_queued(rp); | 1101 | nevents = mon_bin_queued(rp); |
1102 | 1102 | ||
1103 | sp = (struct mon_bin_stats __user *)arg; | 1103 | sp = (struct mon_bin_stats __user *)arg; |
1104 | if (put_user(rp->cnt_lost, &sp->dropped)) | 1104 | if (put_user(ndropped, &sp->dropped)) |
1105 | return -EFAULT; | 1105 | return -EFAULT; |
1106 | if (put_user(nevents, &sp->queued)) | 1106 | if (put_user(nevents, &sp->queued)) |
1107 | return -EFAULT; | 1107 | return -EFAULT; |