summaryrefslogtreecommitdiff
path: root/print-rsvp.c
Commit message (Collapse)AuthorAgeFilesLines
* Use more the EXTRACT_8BITS() macro to fetch a one-byte value (10/n)Francois-Xavier Le Bail2017-11-191-1/+1
| | | | In tok2str() calls (step 2).
* Use more the EXTRACT_8BITS() macro to fetch a one-byte value (8/n)Francois-Xavier Le Bail2017-11-191-2/+2
| | | | In RSVP_OBJ_XRO_MASK_SUBOBJ() macro calls.
* Use more the EXTRACT_8BITS() macro to fetch a one-byte value (7/n)Francois-Xavier Le Bail2017-11-191-1/+1
| | | | In RSVP_OBJ_XRO_MASK_LOOSE() macro call.
* Use more the EXTRACT_8BITS() macro to fetch a one-byte value (2/n)Francois-Xavier Le Bail2017-11-191-6/+6
| | | | In tok2str() calls.
* Use more the EXTRACT_8BITS() macro to fetch a one-byte value (1/n)Francois-Xavier Le Bail2017-11-191-3/+3
| | | | In bittok2str() calls.
* Rename EXTRACT_nBITS() macros to EXTRACT_BE_nBITS()Francois-Xavier Le Bail2017-11-181-108/+108
| | | | | It indicates clearly that these macros are used to extract big-endian integral values.
* RSVP: Update a reference.Denis Ovsienko2017-09-131-3/+3
|
* RSVP: Fix some spelling.Denis Ovsienko2017-09-131-84/+84
|
* Don't specify struct as "const" within sizeof().Denis Ovsienko2017-09-131-11/+11
| | | | | The only difference the const qualifier makes in this context is visual, make it consistent with the rest of the source code.
* CVE-2017-13051/RSVP: fix bounds checks for UNIDenis Ovsienko2017-09-131-1/+18
| | | | | | | | | | | Fixup the part of rsvp_obj_print() that decodes the GENERALIZED_UNI object from RFC 3476 Section 3.1 to check the sub-objects inside that object more thoroughly. This fixes a buffer over-read discovered by Bhargava Shastry, SecT/TU Berlin. Add a test using the capture file supplied by the reporter(s).
* CVE-2017-13048/RSVP: fix decoding of Fast Reroute objectsDenis Ovsienko2017-09-131-1/+2
| | | | | | | | | | | In rsvp_obj_print() the case block for Class-Num 205 (FAST_REROUTE) from RFC 4090 Section 4.1 could over-read accessing the buffer contents before making the bounds check. Rearrange those steps the correct way around. This fixes a buffer over-read discovered by Bhargava Shastry, SecT/TU Berlin. Add a test using the capture file supplied by the reporter(s).
* zero change: update Hannes Gredler's emailHannes Gredler2017-07-281-1/+1
|
* RSVP: add two missing breaksDenis Ovsienko2017-07-221-0/+2
| | | | | | | | | | Add a break at the end of the RSVP_OBJ_LABEL_SET case block as it fully deals with class number 36 (LABEL_SET) from RFC 3473 Section 2.6 and is not related to the class in next case block. Add a break at the end of the RSVP_OBJ_S2L case block as it fully deals with class number 50 (S2L_SUB_LSP) from RFC 4875 Section 19.3 and does not need to fall through to the default case block.
* Fix some if statements missing brackets.Guy Harris2017-01-181-3/+6
|
* Move the printer summaries from INSTALL.txt to each printerFrancois-Xavier Le Bail2016-08-141-0/+2
| | | | | | | | with the tag '\summary:' for greping. Remark: Currently some printers have no summary line. Moreover: Summarize all printers with a single line in INSTALL.txt
* RSVP: Add bounds and length checksFrancois-Xavier Le Bail2016-07-041-3/+24
|
* RSVP: Add a bounds checkFrancois-Xavier Le Bail2016-07-041-0/+1
|
* Change istr[] (for invalid string) to be globalFrancois-Xavier Le Bail2016-01-281-1/+0
|
* RSVP: squelch a compiler warningDenis Ovsienko2015-12-281-1/+1
| | | | | | | ./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; ^
* I suspect an INTEGRITY object in a submessage covers only the submessage.Guy Harris2015-12-271-9/+25
| | | | | | | | | | 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."
* If HAVE_LIBCRYPTO isn't defined, define a stub signature_verify().Guy Harris2015-12-271-19/+3
| | | | That cleans up its callers.
* Have signature_verify() do the copying and clearing.Guy Harris2015-12-271-20/+27
| | | | | | | 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.
* RSVP: Add some bounds checksFrancois-Xavier Le Bail2015-11-061-3/+18
| | | | | Moreover: Add and use tstr[] string.
* RSVP: Fix an infinite loopFrancois-Xavier Le Bail2015-10-061-0/+8
|
* Don't require IPv6 library support in order to support IPv6 addresses.Guy Harris2015-09-171-18/+0
| | | | | | | | | | | | | Have our own routines to convert between IPv4/IPv6 addresses and strings; that helps if, for example, we want to build binary versions of tcpdump for Windows that can run both on NT 5 (W2K/WXP), which doesn't have inet_ntop() or inet_pton(), and NT 6 (Vista/7/8/10), which do. It also means that we don't require IPv6 library support on UN*X to print addresses (if somebody wants to build tcpdump for older UN*Xes lacking IPv6 support in the system library or in add-on libraries). Get rid of files in the missing directory that we don't need, and various no-longer-necessary autoconf tests.
* Rename 'tcpdump-stdinc.h' to 'netdissect-stdinc.h'Francois-Xavier Le Bail2015-09-101-1/+1
| | | | Get the full log via: git log --follow netdissect-stdinc.h
* Printers must include 'netdissect.h', not 'interface.h'Francois-Xavier Le Bail2015-09-051-1/+1
|
* dismiss NETDISSECT_REWORKED macroDenis Ovsienko2015-03-221-1/+0
| | | | | | | The purpose of this macro was to enable the file-by-file switch to NDO, after which only tcpdump.c had a use of it and the definitions guarded by it. Update tcpdump.c not to require them any more and dismiss the unused definitions.
* clean K&R style up in function declarations a bitDenis Ovsienko2015-03-051-6/+6
| | | | The function body should have its opening brace on the next line.
* don't reinvent ND_TCHECK2()Denis Ovsienko2014-06-121-2/+1
|
* u_intN_t is dead, long live uintN_t.Guy Harris2014-04-231-25/+25
| | | | | | | | | And, as we require at least autoconf 2.61, and as autoconf 2.61 and later have AC_TYPE_UINTn_T and AC_TYPE_INTn_T macros, we use them to define the uintN_t and intN_t macros if the system doesn't define them for us. This lets us get rid of bitypes.h as well.
* Netdissectify the to-name resolution routines.Guy Harris2014-04-041-40/+40
| | | | | | | | Have them take a netdissect_options * argument, and get the "no name resolution" flag from it. Move the declaration of dnaddr_string to addrtoname.h, along with the other XXX-to-string routines.
* NDOize some generic codeDenis Ovsienko2014-04-031-1/+1
|
* NDOize LLDP, PPP and RSVP decodersDenis Ovsienko2014-04-021-226/+223
|
* NDOize safeputs() and safeputchar()Denis Ovsienko2014-04-011-1/+1
|
* remove tcpdump's own CVS keywordsDenis Ovsienko2014-01-031-5/+0
| | | | | | Remove lots of $Header's and a few $Id's that all belong to the former CVS repository of tcpdump itself. These keywords have been frozen since the migration to git in late 2008.
* ndo-ize print-ascii: hex_print_with_offset()Michael Richardson2014-01-011-5/+5
|
* whitespace changesMichael Richardson2014-01-011-35/+35
|
* justify declarations of struct tok arraysDenis Ovsienko2013-09-241-5/+5
| | | | | | Make sure all of them are declared const and most of them -- static. Proper declaration of token arrays is a common review point for new code that is based on existing decoders. Thus fix the issue at its root.
* Fix a bunch of "sizeof(sizeof(XXX))".Sascha Wildner2011-12-071-1/+1
| | | | | | | | In some places, there was one too many levels of sizeof() - sizeof(sizeof(XXX)) is sizeof(size_t), but we wanted the size of type XXX. Reviewed-By: Guy Harris <guy@alum.mit.edu>
* Don't warn about the non-use of some arguments to rsvp_obj_print() if weGuy Harris2010-01-051-1/+9
| | | | don't have libcrypto, as we can't use them if we don't.
* Fix indentation to make it clearer what the arguments to a printf callGuy Harris2009-06-281-3/+3
| | | | | | | | | | | are. To extract a 32-bit big-endian quantity from a particular address, use EXTRACT_32BITS(), don't do pointer casting - casting a "char *" or "unsigned char *" to point to a multi-byte quantity doesn't guarantee the pointer can be dereferenced and give you the right answer (SPARC traps on unaligned pointer accesses, some other processor types might also trap, or might ignore the low bits of the pointer).
* From Marc Binderberger:Guy (Core OS) Harris2009-06-091-0/+20
| | | | | attached a patch for print-rsvp.c to decode the "label" subobject for Record Route Objects (RRO).
* From Marc Binderberger:Guy (Core OS) Harris2009-06-091-9/+9
| | | | | | | | | | | | | | | I think this is a mistake in the procedure used to display the bitfield. Instead of tok2str() it should be bittok2str() - at least since I changed it it display the flag field of the RSVP session attribute correctly. Diff file attached. Additionally I've taken the freedom to shorten the displayed strings a bit, taking the "desired" away that was in every string. While correct RFC it fills the screen. Not sure about your procedures changing output but as it never displayed before anyway ... ;-)
* add infrastructure for verifiying the HMAC-MD5 digest in routing protocols.hannes2008-08-161-11/+34
| | | | | | | The shared secret is passed using the already existing -M option which is used for TCP-MD5 checking. add initial supoort for RSVP Integrity object verification.
* add support for p2mp rsvp objects as per rfc4875hannes2008-03-031-1/+118
|
* Don't declare variables in the middle of a block of code; in C89, that'sguy2007-09-131-3/+3
| | | | not valid.
* From Carles Kishimoto <carles.kishimoto@gmail.com>:hannes2007-02-261-3/+126
| | | | add support for OIF RSVP Extensions UNI 1.0 Rev. 2
* From Carles Kishimoto <carles.kishimoto@gmail.com>:hannes2007-02-261-2/+62
| | | | add support for the GMPLS 'label set' RSVP object.
* bugfix rom Carles Kishimoto <carles.kishimoto@gmail.com>:hannes2007-02-261-5/+5
| | | | the GMPLS label rquest object (c-type 4) is 4 octets (and not 8) in size.