commit libpcap for openSUSE:Factory
![](https://seccdn.libravatar.org/avatar/e2145bc5cf53dda95c308a3c75e8fef3.jpg?s=120&d=mm&r=g)
Hello community, here is the log from the commit of package libpcap for openSUSE:Factory checked in at 2014-09-09 18:59:43 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/libpcap (Old) and /work/SRC/openSUSE:Factory/.libpcap.new (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Package is "libpcap" Changes: -------- --- /work/SRC/openSUSE:Factory/libpcap/libpcap.changes 2014-08-25 11:03:24.000000000 +0200 +++ /work/SRC/openSUSE:Factory/.libpcap.new/libpcap.changes 2014-09-09 18:59:53.000000000 +0200 @@ -1,0 +2,11 @@ +Wed Sep 3 18:46:50 UTC 2014 - andreas.stieger@gmx.de + +- libpcap 1.6.2: + * Don't crash on filters testing a non-existent link-layer type + field. + * Fix sending in non-blocking mode on Linux with memory-mapped + capture. + * Fix timestamps when reading pcap-ng files on big-endian + machines. + +------------------------------------------------------------------- Old: ---- libpcap-1.6.1.tar.gz libpcap-1.6.1.tar.gz.sig New: ---- libpcap-1.6.2.tar.gz libpcap-1.6.2.tar.gz.sig ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ libpcap.spec ++++++ --- /var/tmp/diff_new_pack.eH1ulK/_old 2014-09-09 18:59:55.000000000 +0200 +++ /var/tmp/diff_new_pack.eH1ulK/_new 2014-09-09 18:59:55.000000000 +0200 @@ -20,7 +20,7 @@ %bcond_with bluetooth Name: libpcap -Version: 1.6.1 +Version: 1.6.2 Release: 0 Summary: A Library for Network Sniffers License: BSD-3-Clause ++++++ libpcap-1.6.1.tar.gz -> libpcap-1.6.2.tar.gz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libpcap-1.6.1/CHANGES new/libpcap-1.6.2/CHANGES --- old/libpcap-1.6.1/CHANGES 2014-07-19 15:26:03.000000000 +0200 +++ new/libpcap-1.6.2/CHANGES 2014-09-03 02:01:35.000000000 +0200 @@ -1,3 +1,12 @@ +Monday Aug. 12, 2014 guy@alum.mit.edu + Summary for 1.6.2 tcpdump release + Don't crash on filters testing a non-existent link-layer type + field. + Fix sending in non-blocking mode on Linux with memory-mapped + capture. + Fix timestamps when reading pcap-ng files on big-endian + machines. + Saturday Jul. 19, 2014 mcr@sandelman.ca Summary for 1.6.1 tcpdump release some fixes for the any device diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libpcap-1.6.1/VERSION new/libpcap-1.6.2/VERSION --- old/libpcap-1.6.1/VERSION 2014-07-19 15:22:02.000000000 +0200 +++ new/libpcap-1.6.2/VERSION 2014-09-03 02:02:35.000000000 +0200 @@ -1 +1 @@ -1.6.1 +1.6.2 diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libpcap-1.6.1/gencode.c new/libpcap-1.6.2/gencode.c --- old/libpcap-1.6.1/gencode.c 2014-07-03 00:12:49.000000000 +0200 +++ new/libpcap-1.6.2/gencode.c 2014-09-03 02:01:35.000000000 +0200 @@ -2902,6 +2902,7 @@ register int proto; { struct block *b0, *b1, *b2; + const char *description; /* are we checking MPLS-encapsulated packets? */ if (label_stack_depth > 0) { @@ -3418,26 +3419,36 @@ * either missing or behind TLVs. */ bpf_error("NFLOG link-layer type filtering not implemented"); - } - - /* - * All the types that have no encapsulation should either be - * handled as DLT_SLIP, DLT_SLIP_BSDOS, and DLT_RAW are, if - * all packets are IP packets, or should be handled in some - * special case, if none of them are (if some are and some - * aren't, the lack of encapsulation is a problem, as we'd - * have to find some other way of determining the packet type). - * - * Therefore, if "off_linktype" is -1, there's an error. - */ - if (off_linktype == (u_int)-1) - abort(); - /* - * Any type not handled above should always have an Ethernet - * type at an offset of "off_linktype". - */ - return gen_cmp(OR_LINK, off_linktype, BPF_H, (bpf_int32)proto); + default: + /* + * Does this link-layer header type have a field + * indicating the type of the next protocol? If + * so, off_linktype will be the offset of that + * field in the packet; if not, it will be -1. + */ + if (off_linktype != (u_int)-1) { + /* + * Yes; assume it's an Ethernet type. (If + * it's not, it needs to be handled specially + * above.) + */ + return gen_cmp(OR_LINK, off_linktype, BPF_H, (bpf_int32)proto); + } else { + /* + * No; report an error. + */ + description = pcap_datalink_val_to_description(linktype); + if (description != NULL) { + bpf_error("%s link-layer type filtering not implemented", + description); + } else { + bpf_error("DLT %u link-layer type filtering not implemented", + linktype); + } + } + break; + } } /* diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libpcap-1.6.1/pcap-linux.c new/libpcap-1.6.2/pcap-linux.c --- old/libpcap-1.6.1/pcap-linux.c 2014-07-19 15:21:09.000000000 +0200 +++ new/libpcap-1.6.2/pcap-linux.c 2014-09-03 02:01:35.000000000 +0200 @@ -4019,6 +4019,13 @@ struct pcap_linux *handlep = p->priv; /* + * Set the file descriptor to non-blocking mode, as we use + * it for sending packets. + */ + if (pcap_setnonblock_fd(p, nonblock, errbuf) == -1) + return -1; + + /* * Map each value to their corresponding negation to * preserve the timeout value provided with pcap_set_timeout. */ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libpcap-1.6.1/sf-pcap-ng.c new/libpcap-1.6.2/sf-pcap-ng.c --- old/libpcap-1.6.1/sf-pcap-ng.c 2014-07-03 00:12:49.000000000 +0200 +++ new/libpcap-1.6.2/sf-pcap-ng.c 2014-09-03 02:01:35.000000000 +0200 @@ -459,7 +459,7 @@ return (-1); } saw_tsresol = 1; - tsresol_opt = *(u_int *)optvalue; + memcpy(&tsresol_opt, optvalue, sizeof(tsresol_opt)); if (tsresol_opt & 0x80) { /* * Resolution is negative power of 2. -- To unsubscribe, e-mail: opensuse-commit+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-commit+help@opensuse.org
participants (1)
-
root@hilbert.suse.de