1
0
mirror of https://git.FreeBSD.org/ports.git synced 2024-11-24 00:45:52 +00:00

Fix the critical bug in capability negotiation.

Obtained from:	NetBSD pkgsrc
This commit is contained in:
Munechika SUMIKAWA 2002-08-06 05:17:09 +00:00
parent 897e8d89fc
commit 8773bb6f88
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=64085
6 changed files with 240 additions and 3 deletions

View File

@ -7,7 +7,7 @@
PORTNAME= zebra
PORTVERSION= 0.93a
PORTREVSION= 1
PORTREVSION= 2
CATEGORIES= net ipv6
MASTER_SITES= ftp://ftp.zebra.org/pub/zebra/ \
ftp://ftp.ripe.net/mirrors/sites/ftp.zebra.org/pub/zebra/ \

View File

@ -0,0 +1,79 @@
diff -u1 bgpd/bgp_fsm.c /home/itojun/work/zebra/zebra/bgpd/bgp_fsm.c
--- bgpd/bgp_fsm.c Wed Jun 19 17:05:38 2002
+++ /home/itojun/work/zebra/zebra/bgpd/bgp_fsm.c Sat Aug 3 21:05:48 2002
@@ -348,2 +348,5 @@
+ /* Send capability. */
+ SET_FLAG (peer->sflags, PEER_STATUS_CAPABILITY_OPEN);
+
/* Delete all existing events of the peer. */
$NetBSD: patch-bb,v 1.1 2002/08/03 12:27:20 itojun Exp $
diff -u1 bgpd/bgp_open.c /home/itojun/work/zebra/zebra/bgpd/bgp_open.c
--- bgpd/bgp_open.c Wed Jun 19 17:05:38 2002
+++ /home/itojun/work/zebra/zebra/bgpd/bgp_open.c Sat Aug 3 21:05:48 2002
@@ -670,7 +670,2 @@
- /* Do not send capability. */
- if (! CHECK_FLAG (peer->sflags, PEER_STATUS_CAPABILITY_OPEN)
- || CHECK_FLAG (peer->flags, PEER_FLAG_DONT_CAPABILITY))
- return;
-
/* When the peer is IPv4 unicast only, do not send capability. */
diff -u1 bgpd/bgp_packet.c /home/itojun/work/zebra/zebra/bgpd/bgp_packet.c
--- bgpd/bgp_packet.c Sat Jun 29 15:20:39 2002
+++ /home/itojun/work/zebra/zebra/bgpd/bgp_packet.c Sat Aug 3 21:05:49 2002
@@ -758,3 +758,5 @@
/* Set capability code. */
- bgp_open_capability (s, peer);
+ if (CHECK_FLAG (peer->sflags, PEER_STATUS_CAPABILITY_OPEN) &&
+ ! CHECK_FLAG (peer->flags, PEER_FLAG_DONT_CAPABILITY))
+ bgp_open_capability (s, peer);
diff -u1 bgpd/bgp_vty.c /home/itojun/work/zebra/zebra/bgpd/bgp_vty.c
--- bgpd/bgp_vty.c Mon Jul 8 22:31:01 2002
+++ /home/itojun/work/zebra/zebra/bgpd/bgp_vty.c Sat Aug 3 21:05:54 2002
@@ -98,8 +98,2 @@
- if (peer_address_self_check (&su))
- {
- vty_out (vty, "%% Cannot configure the local system as neighbor%s", VTY_NEWLINE);
- return NULL;
- }
-
peer = peer_lookup (bgp, &su);
@@ -128,8 +122,2 @@
{
- if (peer_address_self_check (&su))
- {
- vty_out (vty, "%% Cannot configure the local system as neighbor%s", VTY_NEWLINE);
- return NULL;
- }
-
peer = peer_lookup (bgp, &su);
@@ -1123,3 +1111,4 @@
{
- vty_out (vty, "%% Cannot configure the local system as neighbor%s", VTY_NEWLINE);
+ vty_out (vty, "%% Can not configure the local system as neighbor%s",
+ VTY_NEWLINE);
return CMD_WARNING;
@@ -1200,9 +1189,2 @@
{
- if (peer_address_self_check (&su))
- {
- vty_out (vty, "%% Cannot configure the local system as neighbor%s",
- VTY_NEWLINE);
- return CMD_WARNING;
- }
-
peer = peer_lookup (vty->index, &su);
@@ -1410,2 +1392,9 @@
vty_out (vty, "%% Configure the peer-group first%s", VTY_NEWLINE);
+ return CMD_WARNING;
+ }
+
+ if (peer_address_self_check (&su))
+ {
+ vty_out (vty, "%% Can not configure the local system as neighbor%s",
+ VTY_NEWLINE);
return CMD_WARNING;

View File

@ -7,7 +7,7 @@
PORTNAME= zebra
PORTVERSION= 0.93a
PORTREVSION= 1
PORTREVSION= 2
CATEGORIES= net ipv6
MASTER_SITES= ftp://ftp.zebra.org/pub/zebra/ \
ftp://ftp.ripe.net/mirrors/sites/ftp.zebra.org/pub/zebra/ \

View File

@ -0,0 +1,79 @@
diff -u1 bgpd/bgp_fsm.c /home/itojun/work/zebra/zebra/bgpd/bgp_fsm.c
--- bgpd/bgp_fsm.c Wed Jun 19 17:05:38 2002
+++ /home/itojun/work/zebra/zebra/bgpd/bgp_fsm.c Sat Aug 3 21:05:48 2002
@@ -348,2 +348,5 @@
+ /* Send capability. */
+ SET_FLAG (peer->sflags, PEER_STATUS_CAPABILITY_OPEN);
+
/* Delete all existing events of the peer. */
$NetBSD: patch-bb,v 1.1 2002/08/03 12:27:20 itojun Exp $
diff -u1 bgpd/bgp_open.c /home/itojun/work/zebra/zebra/bgpd/bgp_open.c
--- bgpd/bgp_open.c Wed Jun 19 17:05:38 2002
+++ /home/itojun/work/zebra/zebra/bgpd/bgp_open.c Sat Aug 3 21:05:48 2002
@@ -670,7 +670,2 @@
- /* Do not send capability. */
- if (! CHECK_FLAG (peer->sflags, PEER_STATUS_CAPABILITY_OPEN)
- || CHECK_FLAG (peer->flags, PEER_FLAG_DONT_CAPABILITY))
- return;
-
/* When the peer is IPv4 unicast only, do not send capability. */
diff -u1 bgpd/bgp_packet.c /home/itojun/work/zebra/zebra/bgpd/bgp_packet.c
--- bgpd/bgp_packet.c Sat Jun 29 15:20:39 2002
+++ /home/itojun/work/zebra/zebra/bgpd/bgp_packet.c Sat Aug 3 21:05:49 2002
@@ -758,3 +758,5 @@
/* Set capability code. */
- bgp_open_capability (s, peer);
+ if (CHECK_FLAG (peer->sflags, PEER_STATUS_CAPABILITY_OPEN) &&
+ ! CHECK_FLAG (peer->flags, PEER_FLAG_DONT_CAPABILITY))
+ bgp_open_capability (s, peer);
diff -u1 bgpd/bgp_vty.c /home/itojun/work/zebra/zebra/bgpd/bgp_vty.c
--- bgpd/bgp_vty.c Mon Jul 8 22:31:01 2002
+++ /home/itojun/work/zebra/zebra/bgpd/bgp_vty.c Sat Aug 3 21:05:54 2002
@@ -98,8 +98,2 @@
- if (peer_address_self_check (&su))
- {
- vty_out (vty, "%% Cannot configure the local system as neighbor%s", VTY_NEWLINE);
- return NULL;
- }
-
peer = peer_lookup (bgp, &su);
@@ -128,8 +122,2 @@
{
- if (peer_address_self_check (&su))
- {
- vty_out (vty, "%% Cannot configure the local system as neighbor%s", VTY_NEWLINE);
- return NULL;
- }
-
peer = peer_lookup (bgp, &su);
@@ -1123,3 +1111,4 @@
{
- vty_out (vty, "%% Cannot configure the local system as neighbor%s", VTY_NEWLINE);
+ vty_out (vty, "%% Can not configure the local system as neighbor%s",
+ VTY_NEWLINE);
return CMD_WARNING;
@@ -1200,9 +1189,2 @@
{
- if (peer_address_self_check (&su))
- {
- vty_out (vty, "%% Cannot configure the local system as neighbor%s",
- VTY_NEWLINE);
- return CMD_WARNING;
- }
-
peer = peer_lookup (vty->index, &su);
@@ -1410,2 +1392,9 @@
vty_out (vty, "%% Configure the peer-group first%s", VTY_NEWLINE);
+ return CMD_WARNING;
+ }
+
+ if (peer_address_self_check (&su))
+ {
+ vty_out (vty, "%% Can not configure the local system as neighbor%s",
+ VTY_NEWLINE);
return CMD_WARNING;

View File

@ -7,7 +7,7 @@
PORTNAME= zebra
PORTVERSION= 0.93a
PORTREVSION= 1
PORTREVSION= 2
CATEGORIES= net ipv6
MASTER_SITES= ftp://ftp.zebra.org/pub/zebra/ \
ftp://ftp.ripe.net/mirrors/sites/ftp.zebra.org/pub/zebra/ \

View File

@ -0,0 +1,79 @@
diff -u1 bgpd/bgp_fsm.c /home/itojun/work/zebra/zebra/bgpd/bgp_fsm.c
--- bgpd/bgp_fsm.c Wed Jun 19 17:05:38 2002
+++ /home/itojun/work/zebra/zebra/bgpd/bgp_fsm.c Sat Aug 3 21:05:48 2002
@@ -348,2 +348,5 @@
+ /* Send capability. */
+ SET_FLAG (peer->sflags, PEER_STATUS_CAPABILITY_OPEN);
+
/* Delete all existing events of the peer. */
$NetBSD: patch-bb,v 1.1 2002/08/03 12:27:20 itojun Exp $
diff -u1 bgpd/bgp_open.c /home/itojun/work/zebra/zebra/bgpd/bgp_open.c
--- bgpd/bgp_open.c Wed Jun 19 17:05:38 2002
+++ /home/itojun/work/zebra/zebra/bgpd/bgp_open.c Sat Aug 3 21:05:48 2002
@@ -670,7 +670,2 @@
- /* Do not send capability. */
- if (! CHECK_FLAG (peer->sflags, PEER_STATUS_CAPABILITY_OPEN)
- || CHECK_FLAG (peer->flags, PEER_FLAG_DONT_CAPABILITY))
- return;
-
/* When the peer is IPv4 unicast only, do not send capability. */
diff -u1 bgpd/bgp_packet.c /home/itojun/work/zebra/zebra/bgpd/bgp_packet.c
--- bgpd/bgp_packet.c Sat Jun 29 15:20:39 2002
+++ /home/itojun/work/zebra/zebra/bgpd/bgp_packet.c Sat Aug 3 21:05:49 2002
@@ -758,3 +758,5 @@
/* Set capability code. */
- bgp_open_capability (s, peer);
+ if (CHECK_FLAG (peer->sflags, PEER_STATUS_CAPABILITY_OPEN) &&
+ ! CHECK_FLAG (peer->flags, PEER_FLAG_DONT_CAPABILITY))
+ bgp_open_capability (s, peer);
diff -u1 bgpd/bgp_vty.c /home/itojun/work/zebra/zebra/bgpd/bgp_vty.c
--- bgpd/bgp_vty.c Mon Jul 8 22:31:01 2002
+++ /home/itojun/work/zebra/zebra/bgpd/bgp_vty.c Sat Aug 3 21:05:54 2002
@@ -98,8 +98,2 @@
- if (peer_address_self_check (&su))
- {
- vty_out (vty, "%% Cannot configure the local system as neighbor%s", VTY_NEWLINE);
- return NULL;
- }
-
peer = peer_lookup (bgp, &su);
@@ -128,8 +122,2 @@
{
- if (peer_address_self_check (&su))
- {
- vty_out (vty, "%% Cannot configure the local system as neighbor%s", VTY_NEWLINE);
- return NULL;
- }
-
peer = peer_lookup (bgp, &su);
@@ -1123,3 +1111,4 @@
{
- vty_out (vty, "%% Cannot configure the local system as neighbor%s", VTY_NEWLINE);
+ vty_out (vty, "%% Can not configure the local system as neighbor%s",
+ VTY_NEWLINE);
return CMD_WARNING;
@@ -1200,9 +1189,2 @@
{
- if (peer_address_self_check (&su))
- {
- vty_out (vty, "%% Cannot configure the local system as neighbor%s",
- VTY_NEWLINE);
- return CMD_WARNING;
- }
-
peer = peer_lookup (vty->index, &su);
@@ -1410,2 +1392,9 @@
vty_out (vty, "%% Configure the peer-group first%s", VTY_NEWLINE);
+ return CMD_WARNING;
+ }
+
+ if (peer_address_self_check (&su))
+ {
+ vty_out (vty, "%% Can not configure the local system as neighbor%s",
+ VTY_NEWLINE);
return CMD_WARNING;