Bug 1169322

Summary: pcap-ng timestamp fraction calculation is wrong
Product: [Fedora] Fedora Reporter: Georg Müller <georgmueller>
Component: libpcapAssignee: Michal Sekletar <msekleta>
Status: CLOSED ERRATA QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 21CC: msekleta, thozza
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: libpcap-1.6.2-2.fc21 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2015-02-28 10:21:30 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

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.