bugfix rom Carles Kishimoto <carles.kishimoto@gmail.com>:

the GMPLS label rquest object (c-type 4) is 4 octets (and not 8) in size.
This commit is contained in:
hannes 2007-02-26 07:23:02 +00:00
parent 1f1648b1c4
commit b405dcc85e

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 1998-2005 The TCPDUMP project
* Copyright (c) 1998-2007 The TCPDUMP project
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that: (1) source code
@ -17,7 +17,7 @@
#ifndef lint
static const char rcsid[] _U_ =
"@(#) $Header: /tcpdump/master/tcpdump/print-rsvp.c,v 1.44 2007-02-25 22:06:12 hannes Exp $";
"@(#) $Header: /tcpdump/master/tcpdump/print-rsvp.c,v 1.45 2007-02-26 07:23:02 hannes Exp $";
#endif
#ifdef HAVE_CONFIG_H
@ -907,7 +907,7 @@ rsvp_obj_print (const u_char *tptr, const char *ident, u_int tlen) {
obj_tptr+=12;
break;
case RSVP_CTYPE_4:
if (obj_tlen < 8)
if (obj_tlen < 4)
return-1;
printf("%s LSP Encoding Type: %s (%u)",
ident,
@ -925,8 +925,8 @@ rsvp_obj_print (const u_char *tptr, const char *ident, u_int tlen) {
"Unknown",
EXTRACT_16BITS(obj_tptr+2)),
EXTRACT_16BITS(obj_tptr+2));
obj_tlen-=8;
obj_tptr+=8;
obj_tlen-=4;
obj_tptr+=4;
break;
default:
hexdump=TRUE;