| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
| |
We already use GET_BE_U_2(), and use 2 in the TLV_TCHECK() call; this
makes it a bit more obvious (if you read TLV_TCHECK()) that the test
makes sure we can subtract from tlv_tlen without underflowing.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Replace calls to ipaddr_string()/ip6addr_string() with calls to
GET_IPADDR_STRING()/GET_IP6ADDR_STRING() macros performing bounds
checking.
Fix a regression in 78a4ee82226a3fe19981841dfe24d5e9cb437524.
This fixes a buffer over-read in ldp_tlv_print() discovered by
Jason Xiaole.
Add a test using the capture file supplied by the reporter updated
to keep only the packet showing the buffer over-read.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
In ldp_tlv_print(), the FT Session TLV length must be 12, not 8 (RFC3479)
Moreover:
Update the TLV_TCHECK() macro to remove the useless ND_TCHECK_LEN() call
with the GET_ macros. Thus remain the length check giving a more accurate
output.
Rename a label.
Update the output of a test accordingly.
Add a comment.
Partial update from aa5c6b710dfd8020d2c908d6b3bd41f1da719b3b
in 4.9 branch.
|
|
|
|
|
|
| |
The error was:
print-ldp.c:557:13: runtime error: unsigned integer overflow: 32 - 34
cannot be represented in type 'unsigned int'
|
|
|
|
|
| |
All hail the integer promotions, which stick signedness into the middle
of otherwise-unsigned expressions!
|
| |
|
| |
|
|
|
|
|
|
|
| |
The exceptions are currently:
Some EXTRACT_ in print-juniper.c, not used on packet buffer pointer.
An EXTRACT_BE_U_3 in addrtoname.c, not always used on packet buffer
pointer.
|
|
|
|
|
|
|
|
| |
Remove the tstr[] strings.
Update the output of some tests accordingly.
Moreover:
Add or update some ndo_protocol fields.
|
|
|
|
|
|
| |
Print the characters filtering out non-printable with fn_print_char().
Update the output of some tests accordingly.
|
| |
|
|
|
|
|
| |
Update this field in printer entry functions.
It will be used for some printings.
|
|
|
|
| |
Update the output of some tests accordingly.
|
|
|
|
| |
Fix warnings that introduces.
|
|
|
|
| |
Also, use it, and nd_ipv4, in sizeof() operations.
|
|
|
|
|
|
|
|
| |
This can prevent bizarre failures if, for example, you've done a
configuration in the top-level source directory, leaving behind one
config.h file, and then do an out-of-tree build in another directory,
with different configuration options. This way, we always pick up the
same config.h, in the build directory.
|
| |
|
| |
|
| |
|
| |
|
|
|
|
|
|
| |
Let the compiler do the optimizations (or not) based on build options.
Avoid 'value has been optimized out' messages in gdb using '-O0'.
|
|
|
|
|
| |
ND_TTEST2(var, l) -> ND_TTEST_LEN(p, l)
ND_TCHECK2(var, l) -> ND_TCHECK_LEN(p, l)
|
| |
|
|
|
|
| |
In some safeputchar() calls, *(p).
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Now all the macros have a name meaning a count in bytes.
With _S_: signed, _U_: unsigned
e.g.:
EXTRACT_BE_32BITS -> EXTRACT_BE_U_4
EXTRACT_LE_32BITS -> EXTRACT_LE_U_4
...
EXTRACT_BE_INT32 -> EXTRACT_BE_S_4
and have:
EXTRACT_8BITS -> EXTRACT_U_1
EXTRACT_INT8 -> EXTRACT_S_1
|
|
|
|
|
|
| |
Assignment, *(p op e)
Partial list.
|
|
|
|
| |
In ND_PRINT() macro calls.
|
|
|
|
| |
In bittok2str() calls.
|
|
|
|
|
| |
It indicates clearly that these macros are used to extract big-endian
integral values.
|
|
|
|
|
| |
The only difference the const qualifier makes in this context is visual,
make it consistent with the rest of the source code.
|
| |
|
| |
|
|
|
|
|
|
|
| |
Moreover:
Remove some redundant comments
Update some summary comments
Update the specification URL for ATA over Ethernet (AoE) protocol
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
| |
Get the full log via: git log --follow netdissect-stdinc.h
|
| |
|
|
|
|
|
|
|
| |
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.
|
|
|
|
| |
The function body should have its opening brace on the next line.
|
|
|
|
|
|
|
|
| |
Add more checks, make some checks do a better job of handling too-short
lengths,
Also, rename ldp_msg_print() to ldp_pdu_print(), as it prints a single
PDU, not a single message within a PDU.
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
|
|
| |
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.
|
| |
|
| |
|
|
|
|
|
| |
This change converts IGMP, IPv6 mobility options, LDP, Lightweight
Access Point, PGM, PPTP and RIP decoders.
|
|
|
|
|
| |
The only purpose of that header file was to provide two declarations
that now fit interface.h same well.
|
|
|
|
|
|
| |
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.
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Make sure we don't run past the end of a BGP attribute or LDP TLV when
dissecting the attribute/TLV.
Make some of the code do a bit more of a "step the pointer through the
data"-style dissection; that was done while debugging the changes in
question. It also fixes up some code to not check for more data than
should actually be there.
Update references to RFC 4906 from the draft, and note that RFC 4447
replaces it.
|
|
|
|
|
|
|
|
| |
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>
|