"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "print-msdp.c" between
tcpdump-4.99.0.tar.gz and tcpdump-4.99.1.tar.gz

About: tcpdump is a tool for network monitoring and data acquisition.

print-msdp.c  (tcpdump-4.99.0):print-msdp.c  (tcpdump-4.99.1)
skipping to change at line 39 skipping to change at line 39
#include "extract.h" #include "extract.h"
#define MSDP_TYPE_MAX 7 #define MSDP_TYPE_MAX 7
void void
msdp_print(netdissect_options *ndo, const u_char *sp, u_int length) msdp_print(netdissect_options *ndo, const u_char *sp, u_int length)
{ {
unsigned int type, len; unsigned int type, len;
ndo->ndo_protocol = "msdp"; ndo->ndo_protocol = "msdp";
ND_PRINT(": ");
nd_print_protocol(ndo);
/* See if we think we're at the beginning of a compound packet */ /* See if we think we're at the beginning of a compound packet */
type = GET_U_1(sp); type = GET_U_1(sp);
len = GET_BE_U_2(sp + 1); len = GET_BE_U_2(sp + 1);
if (len > 1500 || len < 3 || type == 0 || type > MSDP_TYPE_MAX) if (len > 1500 || len < 3 || type == 0 || type > MSDP_TYPE_MAX)
goto trunc; /* not really truncated, but still not decodable */ goto trunc; /* not really truncated, but still not decodable */
ND_PRINT(" msdp:");
while (length != 0) { while (length != 0) {
type = GET_U_1(sp); type = GET_U_1(sp);
len = GET_BE_U_2(sp + 1); len = GET_BE_U_2(sp + 1);
if (len > 1400 || ndo->ndo_vflag) if (len > 1400 || ndo->ndo_vflag)
ND_PRINT(" [len %u]", len); ND_PRINT(" [len %u]", len);
if (len < 3) if (len < 3)
goto trunc; goto trunc;
if (length < len) if (length < len)
goto trunc; goto trunc;
sp += 3; sp += 3;
 End of changes. 2 change blocks. 
1 lines changed or deleted 2 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)