]> The Tcpdump Group git mirrors - tcpdump/log
tcpdump
8 years agoupdated version tcpdump-4.8 tcpdump-4.8.1
Michael Richardson [Wed, 26 Oct 2016 00:39:23 +0000 (20:39 -0400)] 
updated version

8 years agoupdated CHANGES for 1.8.0 tcpdump-4.8.0-bp
Michael Richardson [Wed, 26 Oct 2016 00:36:09 +0000 (20:36 -0400)] 
updated CHANGES for 1.8.0

8 years agoMerge branch 'master' of git+ssh://bpf.tcpdump.org/tcpdump/master/git/tcpdump
Michael Richardson [Mon, 1 Aug 2016 15:30:51 +0000 (11:30 -0400)] 
Merge branch 'master' of git+ssh://bpf.tcpdump.org/tcpdump/master/git/tcpdump

8 years agoUse PRIx64 to print a 64-bit number in hex.
Guy Harris [Fri, 29 Jul 2016 20:00:48 +0000 (13:00 -0700)] 
Use PRIx64 to print a 64-bit number in hex.

"lx" doesn't work on ILP32 or LLP64 platforms.

8 years agoMerge pull request #534 from MisterDA/hncp-20160728
Michael Richardson [Fri, 29 Jul 2016 14:38:05 +0000 (16:38 +0200)] 
Merge pull request #534 from MisterDA/hncp-20160728

HNCP support (RFCs 7787 and 7788)

8 years agoAdd test for HNCP. 534/head
Jean-Raphaël GAGLIONE [Thu, 28 Jul 2016 19:22:31 +0000 (21:22 +0200)] 
Add test for HNCP.

8 years agoPrinter for HNCP (RFCs 7787 and 7788).
Jean-Raphaël GAGLIONE [Thu, 28 Jul 2016 19:09:41 +0000 (21:09 +0200)] 
Printer for HNCP (RFCs 7787 and 7788).

This is joint work with Antonin Décimo.

8 years agobumped version
Michael Richardson [Thu, 21 Jul 2016 12:32:52 +0000 (14:32 +0200)] 
bumped version

8 years agoRPKI/Router: Add a return value check for "fn_printn" call
Francois-Xavier Le Bail [Tue, 19 Jul 2016 13:39:06 +0000 (15:39 +0200)] 
RPKI/Router: Add a return value check for "fn_printn" call

8 years agoRESP: Fix Coverity warnings
Francois-Xavier Le Bail [Tue, 19 Jul 2016 12:37:47 +0000 (14:37 +0200)] 
RESP: Fix Coverity warnings

The warnings were:
Calling "fn_printn" without checking return value (as is done elsewhere
52 out of 56 times)

8 years agoAllow building with libcrypto not in the default directory.
Guy Harris [Thu, 14 Jul 2016 00:23:59 +0000 (17:23 -0700)] 
Allow building with libcrypto not in the default directory.

Add support for an argument to --with-crypto, so that if you have one
version of libcrypto installed under /usr and another version installed
under /usr/local, you can force tcpdump to be built with the /usr/local
version.

Also, refer both to OpenSSL and libressl in comments and messages.

8 years agoUpdate list of Geneve option classes. 530/head
Jesse Gross [Fri, 24 Jun 2016 22:45:47 +0000 (15:45 -0700)] 
Update list of Geneve option classes.

Newer versions of the Geneve protocol draft have defined additional
option classes. This updates the list so we can show the class name
instead of unknown.

8 years agoFix error message with invalid Geneve option length.
Jesse Gross [Fri, 24 Jun 2016 22:51:11 +0000 (15:51 -0700)] 
Fix error message with invalid Geneve option length.

8 years agoICMP6 RPL: don't use inet_ntop()
Denis Ovsienko [Mon, 11 Jul 2016 10:55:39 +0000 (11:55 +0100)] 
ICMP6 RPL: don't use inet_ntop()

No other code uses it, there is the ip6addr_string() wrapper. This
switch also makes it possible to avoid some array management.

8 years agouse a mnemonic constant in rpl_daoack_print()
Denis Ovsienko [Mon, 11 Jul 2016 10:34:40 +0000 (11:34 +0100)] 
use a mnemonic constant in rpl_daoack_print()

8 years agocall ipaddr_string() instead of getname()
Denis Ovsienko [Mon, 11 Jul 2016 09:43:34 +0000 (10:43 +0100)] 
call ipaddr_string() instead of getname()

Same as in the previous commit.

8 years agocall ip6addr_string() instead of getname6()
Denis Ovsienko [Mon, 11 Jul 2016 09:26:01 +0000 (10:26 +0100)] 
call ip6addr_string() instead of getname6()

This replaces a few explicit type casts with one type cast in the macro
and makes the source code mean one thing with one term instead of two.

8 years agoMerge pull request #528 from mcr/master
Michael Richardson [Sun, 10 Jul 2016 14:42:54 +0000 (10:42 -0400)] 
Merge pull request #528 from mcr/master

the ROLL RPL DAGID is an IPv6 address

8 years agoadded some minor protection against multiple inclusion 528/head
Michael Richardson [Sat, 9 Jul 2016 21:22:13 +0000 (17:22 -0400)] 
added some minor protection against multiple inclusion

8 years agodagid is always an IPv6 address, not an opaque 128-bit string
Michael Richardson [Sun, 3 Jul 2016 02:14:33 +0000 (22:14 -0400)] 
dagid is always an IPv6 address, not an opaque 128-bit string

8 years agoRSVP: Add bounds and length checks
Francois-Xavier Le Bail [Mon, 4 Jul 2016 20:17:34 +0000 (22:17 +0200)] 
RSVP: Add bounds and length checks

8 years agoOSPF: Do more bounds checking
Francois-Xavier Le Bail [Mon, 4 Jul 2016 19:28:22 +0000 (21:28 +0200)] 
OSPF: Do more bounds checking

8 years agoOSPF: Fix printing 'ospf_topology_values' default
Francois-Xavier Le Bail [Mon, 4 Jul 2016 19:14:10 +0000 (21:14 +0200)] 
OSPF: Fix printing 'ospf_topology_values' default

Moreover:
Fix spaces in ospf_topology_values[]

8 years agoRSVP: Add a bounds check
Francois-Xavier Le Bail [Mon, 4 Jul 2016 10:11:20 +0000 (12:11 +0200)] 
RSVP: Add a bounds check

8 years agodagid is always an IPv6 address, not an opaque 128-bit string
Michael Richardson [Sun, 3 Jul 2016 02:14:33 +0000 (22:14 -0400)] 
dagid is always an IPv6 address, not an opaque 128-bit string

8 years agoDon't use strcasecmp(), use ascii_strcasecmp().
Guy Harris [Fri, 1 Jul 2016 20:58:52 +0000 (13:58 -0700)] 
Don't use strcasecmp(), use ascii_strcasecmp().

Not all platforms have strcasecmp() (yes, it's in the Single UNIX
Specification, but not all platforms are UNIX or even UN*X; there's some
obscure company in Redmond, Washington who have an OS on which we run),
and on those that do, there's no guarantee that strcasecmp() will treate
A-Z and a-z as being equivalent ("I" and "i" aren't equivalent in a
Turkish locale, for example).

Fix indentation while we're at it.

8 years agoMerge pull request #526 from superjamie/Cflag-Wflag-nonzero
Guy Harris [Thu, 30 Jun 2016 00:36:08 +0000 (17:36 -0700)] 
Merge pull request #526 from superjamie/Cflag-Wflag-nonzero

Don't accept zero -C or -W options

8 years agoDon't accept zero -C or -W options 526/head
Jamie Bainbridge [Wed, 29 Jun 2016 23:15:33 +0000 (09:15 +1000)] 
Don't accept zero -C or -W options

Rolling over into zero filesize makes no sense. Creating a rotating
buffer of zero files makes no sense.

Modify the checks for -C and -W to accept greater than one, not greater
than zero.

Signed-off-by: Jamie Bainbridge <[email protected]>
8 years agoSquelch a compiler warning.
Guy Harris [Mon, 27 Jun 2016 01:02:12 +0000 (18:02 -0700)] 
Squelch a compiler warning.

It may not be necessary, but it makes the code a bit cleaner, even if
you spend a few extra microseconds per file fetching the name of the
link-layer header type even if the new file has the same header type.

8 years agoMinor coding style tweak.
Guy Harris [Thu, 23 Jun 2016 04:38:06 +0000 (21:38 -0700)] 
Minor coding style tweak.

8 years agoHandle OpenSSL 1.1.x.
Guy Harris [Thu, 23 Jun 2016 04:14:40 +0000 (21:14 -0700)] 
Handle OpenSSL 1.1.x.

In 1.1.x, EVP_CIPHER_CTX is an opaque structure, so we can't declare it
on the stack.

Instead, if we don't have EVP_CIPHER_CTX_new() and EVP_CIPHER_CTX_free()
in libcrypto, define our own versions, with the same signatures as the
ones in OpenSSL 1.1.x's libcrypto, and have the code use
EVP_CIPHER_CTX_new() to allocate the structure and EVP_CIPHER_CTX_free()
to free it.

8 years agoamend integer argument type (GH#521)
Gisle Vanem [Thu, 2 Jun 2016 10:26:07 +0000 (11:26 +0100)] 
amend integer argument type (GH#521)

8 years agoMerge pull request #519 from dionbosschieter/updatePostrotateCommandHelpText
Guy Harris [Mon, 16 May 2016 18:42:28 +0000 (11:42 -0700)] 
Merge pull request #519 from dionbosschieter/updatePostrotateCommandHelpText

Change -z command help text to -z postrotate-command

8 years agoChange -z command help text to -z postrotate-command 519/head
Dion Bosschieter [Mon, 16 May 2016 18:22:33 +0000 (20:22 +0200)] 
Change -z command help text to -z postrotate-command

9 years agoupdate CREDITS
Denis Ovsienko [Tue, 26 Apr 2016 21:07:10 +0000 (22:07 +0100)] 
update CREDITS

9 years agoMerge pull request #515 from adarqui/typos
Guy Harris [Tue, 26 Apr 2016 19:05:44 +0000 (12:05 -0700)] 
Merge pull request #515 from adarqui/typos

Just fixes a few typos and grammatical issues

9 years agoJust fixes a few typos and grammatical issues: 515/head
Andrew Darqui [Tue, 26 Apr 2016 18:33:37 +0000 (14:33 -0400)] 
Just fixes a few typos and grammatical issues:

- informations/Information
- the the
- usefull/useful
- optionnal/optional
- your/you

9 years agoUse strtol(), not atoi(), to parse integral values.
Guy Harris [Tue, 26 Apr 2016 10:04:21 +0000 (03:04 -0700)] 
Use strtol(), not atoi(), to parse integral values.

strtol()'s error behavior is standardized; atoi()'s isn't.

9 years agoInitial support for the REdis Serialization Protocol known as RESP.
Andrew Darqui [Tue, 12 Jan 2016 17:32:55 +0000 (12:32 -0500)] 
Initial support for the REdis Serialization Protocol known as RESP.

This commit adds support for RESP as defined in: http://redis.io/topics/protocol.
It also supports inline commands and pipelining. Due to the popularity of RESP,
numerous services are emerging that use this protocol. You may decode RESP packets
on arbitrary ports using the "-T resp" option.

Example captures can be found in tests/resp_*.

A simple way to test this parser is to start redis-server and then run
redis-cli commands such as "redis-cli set key value".

Traditionally, redis-cli monitor is used to debug redis. Unfortunately,
the "monitor" command can cause significant load on a redis-server in
production. This parser may be used as a non-invasive alternative to
redis-cli monitor.

9 years agoSquelch a signed vs. unsigned comparison warning.
Guy Harris [Thu, 14 Apr 2016 01:57:09 +0000 (18:57 -0700)] 
Squelch a signed vs. unsigned comparison warning.

uint8_t + int constant = int; make the constant unsigned.

9 years agoGet rid of set-but-not-used variable.
Guy Harris [Thu, 14 Apr 2016 01:54:11 +0000 (18:54 -0700)] 
Get rid of set-but-not-used variable.

9 years agoClean up version test.
Guy Harris [Fri, 25 Mar 2016 19:51:08 +0000 (12:51 -0700)] 
Clean up version test.

!(nfhdr->nflog_version) is equivalent to (nfhdr->nflog_version == 0).

That will evaluate to 1 if nfhdr->nflog_version is 0 and to 0 otherwise.

So !(nfhdr->nflog_version) == 0 is equivalent to nfhdr->nflog_version != 0,
but 1) it's more obvious what it means and 2) compilers don't point out
that it may not mean what you intended.

9 years agoMake sure the length of the header is valid.
Guy Harris [Fri, 25 Mar 2016 19:49:37 +0000 (12:49 -0700)] 
Make sure the length of the header is valid.

It must be at least 2, as it includes the lengths of the Base and
Service Path headers, and those are always present.

9 years agoRestore alphabetical order in Makefile.in and netdissect.h
Francois-Xavier Le Bail [Tue, 22 Mar 2016 16:23:40 +0000 (17:23 +0100)] 
Restore alphabetical order in Makefile.in and netdissect.h

9 years agoAdd printing function for Generic Protocol Extension for VXLAN
bugyo [Sun, 15 Nov 2015 16:24:19 +0000 (16:24 +0000)] 
Add printing function for Generic Protocol Extension for VXLAN
and Network Service Header.

This code stands for following internet drafts:

- VXLAN GPE: draft-ietf-nvo3-vxlan-gpe-01
- NSH: draft-ietf-sfc-nsh-01

9 years agoWe have to set the filter on every new file.
Guy Harris [Sun, 20 Mar 2016 22:59:27 +0000 (15:59 -0700)] 
We have to set the filter on every new file.

Even if we haven't recompiled the filter, because the new file has the
same DLT as the old file, we still need to apply it to the new file.

9 years agoDon't recompile the filter if the new file has the same DLT.
Guy Harris [Sun, 20 Mar 2016 22:23:16 +0000 (15:23 -0700)] 
Don't recompile the filter if the new file has the same DLT.

Only recompile the filter - and only find a new printer and a new DLT
name - if, when reading multiple files with the -V flag, the new file
has a different DLT value from the old file.  With lots of small files,
that can make a significant performance difference.

Addresses GitHub issue #508.

9 years agoHave one switch statement, not two, for radiotap fields.
Guy Harris [Sat, 13 Feb 2016 06:39:24 +0000 (22:39 -0800)] 
Have one switch statement, not two, for radiotap fields.

Merge the two switch statements.

Use local variables, for each case, for the subfields, while we're at
it.

9 years agoDon't overwrite the destination IPv6 address for routing headers.
Guy Harris [Sat, 13 Feb 2016 04:26:39 +0000 (20:26 -0800)] 
Don't overwrite the destination IPv6 address for routing headers.

If we have a routing header, instead of overwriting the packet's IPv6
destination address in the packet with the final destination, so that
the next protocol's checksum routine can use it, we do as we do for
IPv4, and, in the "next protocol checksum" routine, scan the headers
looking for a routing header and, if we find one, copy the final
destination from it.

While we're at it, clean up a few things.

9 years agoPass an adjusted struct pcap_pkthdr to the sub-printer.
Guy Harris [Sat, 13 Feb 2016 02:48:22 +0000 (18:48 -0800)] 
Pass an adjusted struct pcap_pkthdr to the sub-printer.

The caplen and len of the packet it's printing must be reduced by the
length of the PPI header.

9 years agoAdd some packet-length checks.
Guy Harris [Sat, 13 Feb 2016 00:14:35 +0000 (16:14 -0800)] 
Add some packet-length checks.

9 years agoFix check against snapshot length.
Guy Harris [Fri, 12 Feb 2016 22:51:44 +0000 (14:51 -0800)] 
Fix check against snapshot length.

9 years agoAdd three test cases for already fixed CVEs
Francois-Xavier Le Bail [Sat, 6 Feb 2016 13:49:56 +0000 (14:49 +0100)] 
Add three test cases for already fixed CVEs

CVEs by Steffen Bauch
CVE-2014-8767: OLSR
CVE-2014-8768: Geonet
CVE-2014-8769: AODV

9 years agoVXLAN: Add a bound check
Francois-Xavier Le Bail [Sun, 31 Jan 2016 19:27:48 +0000 (20:27 +0100)] 
VXLAN: Add a bound check

Moreover:
Add and use tstr[].
Add and use VXLAN_HDR_LEN.

9 years agoVXLAN: Add a test case
Francois-Xavier Le Bail [Mon, 25 Jan 2016 08:44:31 +0000 (09:44 +0100)] 
VXLAN: Add a test case

9 years agoCONTRIBUTING: Update about invalid packets
Francois-Xavier Le Bail [Thu, 28 Jan 2016 15:57:18 +0000 (16:57 +0100)] 
CONTRIBUTING: Update about invalid packets

9 years agoChange istr[] (for invalid string) to be global
Francois-Xavier Le Bail [Thu, 28 Jan 2016 13:24:19 +0000 (14:24 +0100)] 
Change istr[] (for invalid string) to be global

9 years agoDon't do the DDP-over-UDP heuristic check up front.
Guy Harris [Tue, 12 Jan 2016 00:14:56 +0000 (16:14 -0800)] 
Don't do the DDP-over-UDP heuristic check up front.

There's probably less DDP-over-UDP traffic passing through tcpdump these
days than, for example, SNMP v2 traffic from a low source port longer
than 512 bytes, so move the latter heuristic check after all the other
checks.

Fixes GitHub tcpdump issue #499.

9 years agoFix the radiotap printer to handle the special bits correctly.
Guy Harris [Mon, 11 Jan 2016 23:47:31 +0000 (15:47 -0800)] 
Fix the radiotap printer to handle the special bits correctly.

Process bits 29, 30, and 31 in code that's independent of what namespace
we're in:

  If we're switching to the radiotap namespace, reset the bit numbers to
  start back at 0.

  If we're switching to a vendor namespace, get the vendor OUI and
  subspace, and the skip length.

  Keep trace of which namespace we're in.

  If we're *in* a vendor namespace, skip over the data specified by the
  skip length (and reset it, as we've processed all the vendor namespace
  data and, if there's a subsequent bitmap in the same namespace,
  there's nothing more to process.  Use cpack_align_and_reserve() to
  skip that, so we check that we don't go past the end of the packet
  data.

Fixes GitHub tcpdump issue #498.

This removes some bogus errors; update the test output to reflect that.

9 years agoUse the new debugging routines in libpcap.
Guy Harris [Thu, 31 Dec 2015 02:49:37 +0000 (18:49 -0800)] 
Use the new debugging routines in libpcap.

Newer versions of libpcap, when configured to provide debugging
printouts for the filter expression parser or optimizer, provide
routines to set the "debug the parser" and "debug the optimizer" flags;
use them if the library has them.  If the library doesn't have them, do
our best to try to use the older mechanisms for requesting debugging, if
present.

9 years agoRSVP: squelch a compiler warning
Denis Ovsienko [Mon, 28 Dec 2015 10:32:57 +0000 (10:32 +0000)] 
RSVP: squelch a compiler warning

./print-rsvp.c: In function ‘rsvp_print’:
./print-rsvp.c:1870:13: warning: ISO C90 forbids mixed declarations and code [-Wpedantic]
             u_short subplen, subtlen;
             ^

9 years agoI suspect an INTEGRITY object in a submessage covers only the submessage.
Guy Harris [Mon, 28 Dec 2015 04:13:14 +0000 (20:13 -0800)] 
I suspect an INTEGRITY object in a submessage covers only the submessage.

So don't hand rsvp_obj_print() a pointer to the beginning of, and the
length of, the entire bundle message; hand it a pointer to the beginning
of, and the length of, the submessage.

Use "bundle" rather than "aggregate" as the message type, while we're at
it; to quote RFC 2961, "The term "bundling" is used to avoid confusion
with RSVP reservation aggregation."

9 years agoIf HAVE_LIBCRYPTO isn't defined, define a stub signature_verify().
Guy Harris [Mon, 28 Dec 2015 02:09:33 +0000 (18:09 -0800)] 
If HAVE_LIBCRYPTO isn't defined, define a stub signature_verify().

That cleans up its callers.

9 years agoWe no longer need <stdlib.h> as signature_verify() does the allocation now.
Guy Harris [Mon, 28 Dec 2015 02:00:30 +0000 (18:00 -0800)] 
We no longer need <stdlib.h> as signature_verify() does the allocation now.

9 years agoHave signature_verify() do the copying and clearing.
Guy Harris [Mon, 28 Dec 2015 01:59:56 +0000 (17:59 -0800)] 
Have signature_verify() do the copying and clearing.

Just pass it a pointer to a routine to do the clearing and a pointer to
the data that needs to be cleared; signature_verify() will relocate all
pointers to stuff that needs to be cleared to point into the copy, clear
the signature itself, and call the routine to clear anything else.

9 years agoDon't overwrite packet data when checking the signature.
Guy Harris [Mon, 28 Dec 2015 00:58:52 +0000 (16:58 -0800)] 
Don't overwrite packet data when checking the signature.

Instead, make a copy, and overwrite that.

9 years agoConsistently use tabs for indentation.
Guy Harris [Tue, 22 Dec 2015 04:27:50 +0000 (20:27 -0800)] 
Consistently use tabs for indentation.

9 years agoupdate last modified date in man page(s)
Denis Ovsienko [Thu, 17 Dec 2015 23:51:58 +0000 (23:51 +0000)] 
update last modified date in man page(s)

9 years agoThere is no need to use strdup() for options
Francois-Xavier Le Bail [Thu, 17 Dec 2015 21:04:09 +0000 (22:04 +0100)] 
There is no need to use strdup() for options

The other options don't use it.

9 years agoThe last 2 bytes of an Ethernet header are the "length/type field".
Guy Harris [Thu, 17 Dec 2015 05:04:13 +0000 (21:04 -0800)] 
The last 2 bytes of an Ethernet header are the "length/type field".

Call it that, to indicate that it's not necessarily a type field.

While we're at it, get rid of references to "DEC/Intel/Xerox" and
"802.3" Ethernet headers in comments; since 802.3y, the 802.3 standard
supports both "DIX" frames, with a type field, and earlier 802.3 frames,
with a length field, so there's only one version of Ethernet, 802.3,
which supports frames with type fields and frames with length fields.

9 years agoEthernet: Print the Length/Type field as length when needed
Francois-Xavier Le Bail [Wed, 16 Dec 2015 14:48:14 +0000 (15:48 +0100)] 
Ethernet: Print the Length/Type field as length when needed

Reference: IEEE Std 802.3-2012
"If the value of this field is less than or equal to 1500 decimal
(05DC hexadecimal), then the Length/Type field indicates the number
of MAC client data octets contained in the subsequent MAC Client Data
field of the basic frame (Length interpretation)."

Update the output of a test accordingly.

9 years agoMerge pull request #471 from qnet-herwin/radius_port1700
Denis Ovsienko [Wed, 16 Dec 2015 09:26:40 +0000 (09:26 +0000)] 
Merge pull request #471 from qnet-herwin/radius_port1700

9 years agoDo more bounds checking.
Guy Harris [Wed, 16 Dec 2015 03:12:00 +0000 (19:12 -0800)] 
Do more bounds checking.

Step through the SCTP packet with the bp variable, and keep a packet
data remaining variable and use that for bounds checking.  For each
chunk, keep a chunk data remaining variable and use that as well.  If
there's not enough room for a full item, that gets reported as an error.

While we're at it, fix an error printout.

9 years agoFix some leaks found by Valgrind/Memcheck
Francois-Xavier Le Bail [Tue, 15 Dec 2015 21:12:43 +0000 (22:12 +0100)] 
Fix some leaks found by Valgrind/Memcheck

9 years agoUse uintptr_t to look at the bits of a pointer.
Guy Harris [Tue, 15 Dec 2015 19:22:19 +0000 (11:22 -0800)] 
Use uintptr_t to look at the bits of a pointer.

We use AC_TYPE_UINTPTR_T in the configure script, so it'll be defined if
we use autotools, and MSVC has supported it since at least Visual Studio
.NET 2003, so we'll use it instead of "unsigned long"; "unsigned long"
causes warnings on LLP64 platforms, as it's not wide enough for a
pointer on those platforms.

9 years agoTranslate UDP/1700 as RADIUS 471/head
Herwin Weststrate [Wed, 22 Jul 2015 15:03:56 +0000 (17:03 +0200)] 
Translate UDP/1700 as RADIUS

Used for Cisco CoA/Disconnect, as shown on https://supportforums.cisco.com/discussion/11719766/ise-112-change-authorization-avaya-switches-5520. The RFC says port 3799, but Cisco does this otherwise, which means this is not an officially reserved port for RADIUS.

9 years agoHarmonize TCP source or destination ports tests with UDP ones
Francois-Xavier Le Bail [Mon, 14 Dec 2015 19:28:14 +0000 (20:28 +0100)] 
Harmonize TCP source or destination ports tests with UDP ones

9 years agoCheck for fork/vfork failing.
Guy Harris [Sun, 13 Dec 2015 22:29:40 +0000 (14:29 -0800)] 
Check for fork/vfork failing.

Clean up some other stuff while we're at it.

9 years agoMerge pull request #494 from RomeroMalaquias/master
Guy Harris [Sun, 13 Dec 2015 22:18:14 +0000 (14:18 -0800)] 
Merge pull request #494 from RomeroMalaquias/master

Avoiding conditional directives that break statements

9 years agoAvoiding conditional directives that break statements 494/head
Romero Malaquias [Sun, 13 Dec 2015 21:43:08 +0000 (18:43 -0300)] 
Avoiding conditional directives that break statements

9 years agoOSPF: Fix a segmentation fault
Francois-Xavier Le Bail [Wed, 9 Dec 2015 14:46:12 +0000 (15:46 +0100)] 
OSPF: Fix a segmentation fault

Moreover:
Fix printout of Link Protection Type sub-TLV.
Add some length checks.
Add and use istr[].
Add some comments.

9 years agoAdd missing output files for MPLS/ICMP extensions capture file
Francois-Xavier Le Bail [Fri, 27 Nov 2015 13:28:38 +0000 (14:28 +0100)] 
Add missing output files for MPLS/ICMP extensions capture file

Add the test cases accordingly.
Complete Hannes's commit fad6704f63f034e6e678e466c4094054527fa82d.

9 years agoUDLD: Fix "Unchecked return value" found by Coverity
Francois-Xavier Le Bail [Thu, 26 Nov 2015 15:45:42 +0000 (16:45 +0100)] 
UDLD: Fix "Unchecked return value" found by Coverity

The bounds check is already done before by ND_TCHECK2(*tptr, len).
So we are deliberately ignoring the return value of fn_printn with last
argument NULL (no bounds check).

9 years agoVTP: Add bounds checks
Francois-Xavier Le Bail [Sat, 21 Nov 2015 13:23:44 +0000 (14:23 +0100)] 
VTP: Add bounds checks

9 years agoLISP: Add and use istr[] and tstr[] strings
Francois-Xavier Le Bail [Sat, 21 Nov 2015 09:39:16 +0000 (10:39 +0100)] 
LISP: Add and use istr[] and tstr[] strings

Update the output of a test accordingly.

Moreover:
Delete extra blank lines.

9 years agoUDLD: Fix an infinite loop
Francois-Xavier Le Bail [Fri, 20 Nov 2015 19:23:11 +0000 (20:23 +0100)] 
UDLD: Fix an infinite loop

Moreover:
Update reference from draft to RFC5171.
Add bounds and length checks.
Fix TLV length printout. It is the length of the type, length, and value
fields.
Filter out non-printable characters.
Print the Echo TLV with fn_printn(). Note: The format of this list of ID
pairs is not documented in the RFC.
Update the output of a test accordingly.
Add and use istr[] and tstr[] strings.
Comment on the TLV format.
Update some comments.

9 years agoWe only handle 4-part addresses.
Guy Harris [Wed, 18 Nov 2015 21:29:57 +0000 (13:29 -0800)] 
We only handle 4-part addresses.

Get rid of the code to handle everything else; that code was dead, as
Coverity noted.  Add some comments to clarify what's going on.

9 years agoSquelch a Coverity warning.
Guy Harris [Wed, 18 Nov 2015 21:07:34 +0000 (13:07 -0800)] 
Squelch a Coverity warning.

See Coverity CID 1324572 for tcpdump - the unsigned octets from the IPv6
address were getting extended to ints as a result of getting shifted
left by an int, so make the loop counter unsigned.

9 years agoRemove debugging printouts.
Guy Harris [Wed, 18 Nov 2015 20:46:25 +0000 (12:46 -0800)] 
Remove debugging printouts.

9 years agoISOCLNS: Filter out non-printable characters 487/head
Francois-Xavier Le Bail [Wed, 11 Nov 2015 14:48:20 +0000 (15:48 +0100)] 
ISOCLNS: Filter out non-printable characters

Use fn_printzp().

Moreover:
Delete extra blank lines.

9 years agoVTP: Filter out non-printable characters
Francois-Xavier Le Bail [Tue, 10 Nov 2015 12:28:17 +0000 (13:28 +0100)] 
VTP: Filter out non-printable characters

Use fn_printzp().

Moreover:
Improve some comments.
Use 'type' instead of '*(tptr+1)' when possible.

9 years agoRADIUS: Filter out non-printable characters
Francois-Xavier Le Bail [Mon, 9 Nov 2015 18:53:38 +0000 (19:53 +0100)] 
RADIUS: Filter out non-printable characters

Update a test according to this change.

9 years agoCDP: Filter out non-printable characters
Francois-Xavier Le Bail [Mon, 9 Nov 2015 14:59:58 +0000 (15:59 +0100)] 
CDP: Filter out non-printable characters

Add a fn_print_char() to do filtering.

9 years agoRSVP: Add some bounds checks
Francois-Xavier Le Bail [Fri, 6 Nov 2015 17:55:56 +0000 (18:55 +0100)] 
RSVP: Add some bounds checks

Moreover:
Add and use tstr[] string.

9 years agoISOCLNS: Fix a segmentation fault
Francois-Xavier Le Bail [Wed, 4 Nov 2015 21:51:24 +0000 (22:51 +0100)] 
ISOCLNS: Fix a segmentation fault

Moreover:
Avoid two consecutive truncation messages.

9 years agoKeep our own Ethertype-to-name map.
Guy Harris [Wed, 4 Nov 2015 03:06:41 +0000 (19:06 -0800)] 
Keep our own Ethertype-to-name map.

Don't use a hack to get the table from libpcap; have our own table.
That cleans up the hack, and lets us add stuff to our table without
having to worry about libpcap.

9 years agoMerge pull request #486 from loos-br/master
Guy Harris [Sun, 1 Nov 2015 23:39:46 +0000 (15:39 -0800)] 
Merge pull request #486 from loos-br/master

Fix capsicum support to work with zerocopy buffers in bpf.

9 years agoMissing comma in list of initializers.
Guy Harris [Sun, 1 Nov 2015 21:27:32 +0000 (13:27 -0800)] 
Missing comma in list of initializers.

9 years agoBeginnings of 11ac radiotap support.
Guy Harris [Sun, 1 Nov 2015 19:41:26 +0000 (11:41 -0800)] 
Beginnings of 11ac radiotap support.

9 years agoPRIu64 includes the "u".
Guy Harris [Sat, 31 Oct 2015 17:38:09 +0000 (10:38 -0700)] 
PRIu64 includes the "u".