BGP: Fix detection of additional path
When additional path index are in use there must be more remaining data bytes. Therefore we return only 1 when the len is greater 1. Bug has been reported by Garri. Bug: 12240 Change-Id: Ia24311dcedc450e4208df875bc254c9744dec5dd Reviewed-on: https://code.wireshark.org/review/14396 Petri-Dish: Michael Mann <mmann78@netscape.net> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Michael Mann <mmann78@netscape.net>
This commit is contained in:
parent
bc59efc4e3
commit
48b807a364
|
@ -1971,7 +1971,7 @@ detect_add_path_prefix4(tvbuff_t *tvb, gint offset, gint end) {
|
|||
/* Must NOT be compatible with standard BGP */
|
||||
for (o = offset; o < end; ) {
|
||||
prefix_len = tvb_get_guint8(tvb, o);
|
||||
if( prefix_len == 0) {
|
||||
if( prefix_len == 0 && end - offset > 1 ) {
|
||||
return 1; /* prefix length is zero (i.e. matching all IP prefixes) and remaining bytes within the NLRI is greater than or equal to 1 - may be BGP add-path */
|
||||
}
|
||||
if( prefix_len > 32) {
|
||||
|
|
Loading…
Reference in New Issue