Bug 1169322 - pcap-ng timestamp fraction calculation is wrong
Summary: pcap-ng timestamp fraction calculation is wrong
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: libpcap
Version: 21
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Michal Sekletar
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2014-12-01 10:38 UTC by Georg Müller
Modified: 2015-02-28 10:21 UTC (History)
2 users (show)

Fixed In Version: libpcap-1.6.2-2.fc21
Clone Of:
Environment:
Last Closed: 2015-02-28 10:21:30 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)

Description Georg Müller 2014-12-01 10:38:00 UTC
Description of problem:


Version-Release number of selected component (if applicable):
lipcap 1.6.0 and above

How reproducible:
Open a pcap-ng file with nanosecod resolution. The timestamp fractions returned by pcap_next_ex() will be bigger than the requested fraction (i.e. a value > 1.000.000 for microsecond resolution).


Additional info:
The problem is described in more detail in the libpcap github issue tracker:
https://github.com/the-tcpdump-group/libpcap/issues/396

Comment 1 Georg Müller 2014-12-03 14:08:46 UTC
A patch for the issue is now in upstream master.

https://github.com/the-tcpdump-group/libpcap/commit/6a9c2cb19cb7eebdab8d2fa7a592d39130f8bf61.patch

It would be nice to backport this for fedora 21.

Comment 2 Michal Sekletar 2014-12-03 14:18:03 UTC
Will do! Thank you very much for working with upstream on fix for this, much appreciated.

Comment 3 Fedora Update System 2015-02-23 12:54:11 UTC
libpcap-1.6.2-2.fc21 has been submitted as an update for Fedora 21.
https://admin.fedoraproject.org/updates/libpcap-1.6.2-2.fc21

Comment 4 Fedora Update System 2015-02-23 23:27:56 UTC
Package libpcap-1.6.2-2.fc21:
* should fix your issue,
* was pushed to the Fedora 21 testing repository,
* should be available at your local mirror within two days.
Update it with:
# su -c 'yum update --enablerepo=updates-testing libpcap-1.6.2-2.fc21'
as soon as you are able to.
Please go to the following url:
https://admin.fedoraproject.org/updates/FEDORA-2015-2467/libpcap-1.6.2-2.fc21
then log in and leave karma (feedback).

Comment 5 Georg Müller 2015-02-25 08:58:57 UTC
I tested it and left karma.

Test data was some arbitrary pcap-ng file. Test command was tcpdump -c5 -r test.pcapng

Before:
09:46:24.440130816 IP 192.168.0.1.35988 > 239.255.255.250.ssdp: UDP, length 264
09:46:24.349745280 IP 192.168.0.1.35988 > 239.255.255.250.ssdp: UDP, length 273
09:46:24.349745280 IP 192.168.0.1.35988 > 239.255.255.250.ssdp: UDP, length 336
09:46:24.349745280 IP 192.168.0.1.35988 > 239.255.255.250.ssdp: UDP, length 328
09:46:24.226080748 IP 192.168.0.1.35988 > 239.255.255.250.ssdp: UDP, length 273

After:
09:46:24.017620 IP 192.168.0.1.35988 > 239.255.255.250.ssdp: UDP, length 264
09:46:24.325620 IP 192.168.0.1.35988 > 239.255.255.250.ssdp: UDP, length 273
09:46:24.325620 IP 192.168.0.1.35988 > 239.255.255.250.ssdp: UDP, length 336
09:46:24.325620 IP 192.168.0.1.35988 > 239.255.255.250.ssdp: UDP, length 328
09:46:24.633621 IP 192.168.0.1.35988 > 239.255.255.250.ssdp: UDP, length 273

The new Timestamps are correct.

Comment 6 Michal Sekletar 2015-02-25 13:08:07 UTC
Thanks for testing.

Comment 7 Fedora Update System 2015-02-28 10:21:30 UTC
libpcap-1.6.2-2.fc21 has been pushed to the Fedora 21 stable repository.  If problems still persist, please make note of it in this bug report.


Note You need to log in before you can comment on or make changes to this bug.