| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
| |
Remove also two unnecessary ND_TCHECK_SIZE().
Moreover:
Remove an unnecessary cast.
|
|
|
|
|
|
|
|
|
| |
For BGP, this eliminates some cases where routines return -1 on
truncation; clean up after that.
This also means that some memcpy()s get replaced by UNALIGNED_MEMCPY(),
which may fix some issues on processors that don't support unaligned
accesses.
|
|
|
|
|
| |
Moreover:
Fix indentation.
|
|
|
|
|
|
| |
In the "OSPFv3 Router Properties Registry" the code point 0x08 is
deprecated and the code point 0x10 stands for Nt-bit, not N-bit. Also
list the N-bit from "OSPFv3 Options (24 bits)".
|
|
|
|
|
|
|
|
|
|
|
| |
ND_TCHECK_4(e).
They are redundant because they are followed by a GET_IPADDR_STRING(e)
call, same e, which do the bounds check.
Remove unused 'trunc' labels and associated codes.
Update the output of a test accordingly.
|
|
|
|
|
|
|
| |
Remove a number of instances that do not match common patterns and have
the only substantial effect on the code flow that a truncated packet
triggers "goto trunc" instead of longjmp(). (In a few cases this change
can increase the number of fields printed before giving up.)
|
|
|
|
|
|
|
| |
ND_TCHECK_16(e).
They are redundant because they are followed by a GET_IP6ADDR_STRING(e)
call, same e, which do the bounds check.
|
|
|
|
|
|
|
|
|
|
|
| |
ND_TCHECK_n(e), n in { 1, 2, 3, 4, 8 }.
They are redundant because they are followed by a GET_.*_n(e) call,
same n, same e, which do the bounds check.
Remove unused 'trunc' labels and most associated codes.
Update the outputs of some tests accordingly.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Replace more calls to ipaddr_string()/ip6addr_string() with calls to
GET_IPADDR_STRING()/GET_IP6ADDR_STRING() macros performing bounds
checking.
Add similar bounds-checking inline functions and macros to wrap
linkaddr_string(), etheraddr_string(), and isonsap_string() and convert
calls to them to use the macros as well.
Shuffle the inline functions in addrtoname.h around a bit, so that the
inline functions, external declarations, and macros are all in the same
order.
|
|
|
|
|
| |
Moreover:
Clean up whitespaces/indentation.
|
|
|
|
|
| |
Remove two bounds checks now useless with GET_ macros uses.
The check on 'lshp->ls_router' is needed before ipaddr_string() call.
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
| |
Update this field in printer entry functions.
It will be used for some printings.
|
|
|
|
|
| |
Moreover:
Fix spaces.
|
| |
|
|
|
|
| |
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.
|
| |
|
| |
|
| |
|
| |
|
| |
|
|
|
|
|
|
| |
And add EXTRACT_ calls as required.
Remove no-longer-necessary & operators in EXTRACT_ calls.
|
|
|
|
|
|
| |
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)
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
| |
Now all the macros have a name meaning a count in bytes.
e.g.:
ND_TCHECK_32BITS -> ND_TCHECK_4
ND_TTEST_32BITS -> ND_TTEST_4
|
|
|
|
|
| |
It indicates clearly that these macros are used to extract big-endian
integral values.
|
| |
|
|
|
|
|
|
|
|
| |
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), modified
so the capture file won't be rejected as an invalid capture.
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
| |
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.
|
|
|
|
|
|
|
|
| |
Some compilers appear to put some padding before the ospf6_un union, so
the OSPFv3 packets aren't dissected correctly. Pull the members of
that union into separate structures, and find the pointer to the OSPFv6
body by adding the header length to the pointer to the beginning of the
header.
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
| |
Make the lsa_p_prefix field as large as the largest possible prefix, so
that Coverity doesn't complain about going past the end of an array.
|
|
|
|
|
|
|
|
| |
This bug arose on the OpenCSW build farm:
ospf3_auth-vv : TEST FAILED
Dagobert Michelsen had helped to use the farm servers to debug.
|
|
|
|
|
|
|
|
| |
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.
|
| |
|
|
|
|
|
| |
Make "%s" format string always reside in the print function call
explicitly such that the reader doesn't have to assess its safety.
|