version 1.1.1.3, 2013/07/21 23:54:40
|
version 1.1.1.4, 2016/11/02 10:09:12
|
Line 1
|
Line 1
|
|
/* |
|
* Copyright (C) 2007 Sun Microsystems, Inc. |
|
* |
|
* This file is part of Quagga. |
|
* |
|
* Quagga is free software; you can redistribute it and/or modify it |
|
* under the terms of the GNU General Public License as published by the |
|
* Free Software Foundation; either version 2, or (at your option) any |
|
* later version. |
|
* |
|
* Quagga is distributed in the hope that it will be useful, but |
|
* WITHOUT ANY WARRANTY; without even the implied warranty of |
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
|
* General Public License for more details. |
|
* |
|
* You should have received a copy of the GNU General Public License |
|
* along with Quagga; see the file COPYING. If not, write to the Free |
|
* Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA |
|
* 02111-1307, USA. |
|
*/ |
|
|
#include <zebra.h> |
#include <zebra.h> |
|
|
#include "vty.h" |
#include "vty.h" |
#include "stream.h" |
#include "stream.h" |
#include "privs.h" |
#include "privs.h" |
#include "memory.h" |
#include "memory.h" |
|
#include "filter.h" |
|
|
#include "bgpd/bgpd.h" |
#include "bgpd/bgpd.h" |
#include "bgpd/bgp_open.h" |
#include "bgpd/bgp_open.h" |
Line 290 static struct test_segment misc_segments[] =
|
Line 312 static struct test_segment misc_segments[] =
|
{ 0x41, 0x4, 0xab, 0xcd, 0xef, 0x12 }, /* AS: 2882400018 */ |
{ 0x41, 0x4, 0xab, 0xcd, 0xef, 0x12 }, /* AS: 2882400018 */ |
6, SHOULD_PARSE, 2882400018, |
6, SHOULD_PARSE, 2882400018, |
}, |
}, |
/* 20 */ | { "AS4", |
| "AS4 capability: short", |
| { 0x41, 0x4, 0xab, 0xcd, 0xef }, /* AS: 2882400018 */ |
| 5, SHOULD_ERR, |
| }, |
| { "AS4", |
| "AS4 capability: long", |
| { 0x41, 0x4, 0xab, 0xcd, 0xef, 0x12, 0x12 }, |
| 7, SHOULD_ERR, 2882400018, |
| }, |
{ "GR", |
{ "GR", |
"GR capability", |
"GR capability", |
{ /* hdr */ CAPABILITY_CODE_RESTART, 0xe, |
{ /* hdr */ CAPABILITY_CODE_RESTART, 0xe, |
Line 307 static struct test_segment misc_segments[] =
|
Line 338 static struct test_segment misc_segments[] =
|
}, |
}, |
16, SHOULD_PARSE, |
16, SHOULD_PARSE, |
}, |
}, |
/* 21 */ |
|
{ "GR-short", |
{ "GR-short", |
"GR capability, but header length too short", |
"GR capability, but header length too short", |
{ /* hdr */ 0x40, 0xa, |
{ /* hdr */ 0x40, 0xa, |
Line 322 static struct test_segment misc_segments[] =
|
Line 352 static struct test_segment misc_segments[] =
|
/* safi */ 0x2, |
/* safi */ 0x2, |
/* flags */ 0x1, |
/* flags */ 0x1, |
}, |
}, |
16, SHOULD_PARSE, | 15 /* array is 16 though */, SHOULD_ERR, |
}, |
}, |
/* 22 */ |
|
{ "GR-long", |
{ "GR-long", |
"GR capability, but header length too long", |
"GR capability, but header length too long", |
{ /* hdr */ 0x40, 0xf, |
{ /* hdr */ 0x40, 0xf, |
Line 337 static struct test_segment misc_segments[] =
|
Line 366 static struct test_segment misc_segments[] =
|
/* flags */ 0x0, |
/* flags */ 0x0, |
/* afi */ 0x0, 0x2, |
/* afi */ 0x0, 0x2, |
/* safi */ 0x2, |
/* safi */ 0x2, |
|
/* flags */ 0x01, |
}, |
}, |
16, SHOULD_ERR, |
16, SHOULD_ERR, |
}, |
}, |