[prev in list] [next in list] [prev in thread] [next in thread] 

List:       quagga-dev
Subject:    [quagga-dev 11311] [Patch] Implemention of RFC-6608 (Subcodes for BGP Finite State Machine Error) in
From:       Deepankar Gupta <deepankar.gupta () tcs ! com>
Date:       2014-05-27 4:46:47
Message-ID: OF371A2816.10C27CDA-ON65257CE5.0018EBD9-65257CE5.00192883 () tcs ! com
[Download RAW message or body]

This is a multipart message in MIME format.

This is a multipart message in MIME format.
--=_alternative 0019288165257CE5_=
Content-Type: text/plain; charset="US-ASCII"

Dear David
TCS had submitted the Patch for RFC 6608, let me know, when we can 
feedback.

 Regards
Deepankar Gupta


Abstract of the RFC-6608:

Currently, BGP (Border Gateway Protocol) Finite State Machine sends 
generalized notification messages whenever it receives an unexpected 
message in any of the states.

Due to this the network operators find it hard to diagnose the BGP FSM 
related issues. RFC-6608 defines subcodes for BGP Finite State Machine 
Errors so that a BGP speaker send a notification message defining the 
error code and the subcode in the current state.

Steps to test/run the developed patch file on quagga-0.99.22.3 :

As per the RFC, TCS has implemented subcodes for BGP Finite State Machine 
Error.

To test the notification/error messages for the various states in FSM, we 
can do the following steps :

1. For unexpected message in OpenSent State- we can comment the call to 
the function bgp_packet_set_marker(s, BGP_MSG_OPEN) in bgp_open_send() in 
bgp_packet.c.
2. For unexpected message in OpenConfirm State- we can comment the call to 
BGP_EVENT_ADD(peer, Receive_KEEPALIVE_message) in bgp_keepalive_receive() 
in bgp_packet.c.
3.For unexpected message in Established State- we can comment the call to 
the function bgp_packet_set_marker(s, BGP_MSG_UPDATE) in 
bgp_update_packet() in bgp_packet.c.

Developed by: Kanchan Gupta (Kanchan.gupta1@tcs.com)
Signed off by: Deepankar Gupta(deepankar.gupta@tcs.com)

The in-line Patch is as follows :

diff -upwbNr quagga-0.99.22.3/bgpd/bgp_debug.c 
quagga-0.99.22.3_rfc6608/bgpd/bgp_debug.c
--- quagga-0.99.22.3/bgpd/bgp_debug.c            2013-07-30 
20:17:01.000000000 +0530
+++ quagga-0.99.22.3_rfc6608/bgpd/bgp_debug.c            2014-01-28 
10:22:41.000000000 +0530
@@ -95,6 +95,17 @@ static const struct message bgp_notify_m
 };
 static const int bgp_notify_msg_max = BGP_NOTIFY_MAX;
 
+
+static const struct message bgp_notify_fsm_msg[] = 
+{
+  { BGP_NOTIFY_FINITE_STATE_MACHINE_ERROR, "Finite State Machine Error"},
+  { BGP_NOTIFY_UNEXPECTED_MESSAGE_IN_OPENSENT, "Unexpected Message In 
OpenSent State"},
+  { BGP_NOTIFY_UNEXPECTED_MESSAGE_IN_OPENCONFIRM, "Unexpected Message In 
OpenConfirm State"},
+  { BGP_NOTIFY_UNEXPECTED_MESSAGE_IN_ESTABLISHED, "Unexpected Message In 
Established State"},
+};
+static const int bgp_notify_fsm_msg_max = BGP_NOTIFY_FSM_MAX;
+
+
 static const struct message bgp_notify_head_msg[] = 
 {
   { BGP_NOTIFY_HEADER_NOT_SYNC, "/Connection Not Synchronized"},
@@ -266,6 +277,8 @@ bgp_notify_print(struct peer *peer, stru
     case BGP_NOTIFY_HOLD_ERR:
       break;
     case BGP_NOTIFY_FSM_ERR:
+      subcode_str = LOOKUP_DEF (bgp_notify_fsm_msg, bgp_notify->subcode,
+                                "Unrecognized Error Subcode");
       break;
     case BGP_NOTIFY_CEASE:
       subcode_str = LOOKUP_DEF (bgp_notify_cease_msg, 
bgp_notify->subcode,
diff -upwbNr quagga-0.99.22.3/bgpd/bgpd.h 
quagga-0.99.22.3_rfc6608/bgpd/bgpd.h
--- quagga-0.99.22.3/bgpd/bgpd.h                 2013-07-30 
20:17:01.000000000 +0530
+++ quagga-0.99.22.3_rfc6608/bgpd/bgpd.h                 2014-02-03 
14:44:22.000000000 +0530
@@ -654,6 +654,15 @@ struct bgp_nlri
 
 #define BGP_NOTIFY_SUBCODE_UNSPECIFIC            0
 
+
+/* BGP_NOTIFY_FSM_ERR sub codes.  */
+#define BGP_NOTIFY_FINITE_STATE_MACHINE_ERROR            0
+#define BGP_NOTIFY_UNEXPECTED_MESSAGE_IN_OPENSENT        1
+#define BGP_NOTIFY_UNEXPECTED_MESSAGE_IN_OPENCONFIRM     2
+#define BGP_NOTIFY_UNEXPECTED_MESSAGE_IN_ESTABLISHED     3
+#define BGP_NOTIFY_FSM_MAX                               4
+
+
 /* BGP_NOTIFY_HEADER_ERR sub codes.  */
 #define BGP_NOTIFY_HEADER_NOT_SYNC               1
 #define BGP_NOTIFY_HEADER_BAD_MESLEN             2
diff -upwbNr quagga-0.99.22.3/bgpd/bgp_fsm.c 
quagga-0.99.22.3_rfc6608/bgpd/bgp_fsm.c
--- quagga-0.99.22.3/bgpd/bgp_fsm.c              2013-07-30 
20:17:01.000000000 +0530
+++ quagga-0.99.22.3_rfc6608/bgpd/bgp_fsm.c              2014-02-20 
15:06:13.000000000 +0530
@@ -1086,12 +1086,38 @@ bgp_event (struct thread *thread)
   /* Logging this event. */
   next = FSM [peer->status -1][event - 1].next_state;
 
+ 
   if (BGP_DEBUG (fsm, FSM) && peer->status != next)
+  {
+                  if (peer->status == OpenSent && next != OpenConfirm  )
+                  {
+                                 printf("\n");
+                                 bgp_notify_send (peer, 
BGP_NOTIFY_FSM_ERR, 
+ BGP_NOTIFY_UNEXPECTED_MESSAGE_IN_OPENSENT);
+                                 printf("\n");
+                  }
+                  else if (peer->status == OpenConfirm && next != 
Established  )
+                  {
+                                 printf("\n");
+                                 bgp_notify_send (peer, 
BGP_NOTIFY_FSM_ERR, 
+ BGP_NOTIFY_UNEXPECTED_MESSAGE_IN_OPENCONFIRM);
+                                 printf("\n");
+                  }
+                  else if (peer->status == Established && next == 
Clearing )
+                  {
+                                  printf("\n");
+                                  bgp_notify_send (peer, 
BGP_NOTIFY_FSM_ERR, 
+ BGP_NOTIFY_UNEXPECTED_MESSAGE_IN_ESTABLISHED);
+                                  printf("\n");
+                  }
+                else if(BGP_DEBUG (fsm, FSM) && peer->status != next)
     plog_debug (peer->log, "%s [FSM] %s (%s->%s)", peer->host, 
                        bgp_event_str[event],
                        LOOKUP (bgp_status_msg, peer->status),
                        LOOKUP (bgp_status_msg, next));
 
+  }
+
   /* Call function. */
   if (FSM [peer->status -1][event - 1].func)
     ret = (*(FSM [peer->status - 1][event - 1].func))(peer);
diff -upwbNr quagga-0.99.22.3/bgpd/bgp_packet.c 
quagga-0.99.22.3_rfc6608/bgpd/bgp_packet.c
--- quagga-0.99.22.3/bgpd/bgp_packet.c           2014-02-11 
14:49:05.000000000 +0530
+++ quagga-0.99.22.3_rfc6608/bgpd/bgp_packet.c           2014-02-20 
15:15:29.000000000 +0530
@@ -131,8 +131,11 @@ bgp_connect_check (struct peer *peer)
   else
     {
       if (BGP_DEBUG (events, EVENTS))
+                  {
                   plog_debug (peer->log, "%s [Event] Connect failed 
(%s)",
                                      peer->host, safe_strerror (errno));
+ 
+                  }
       BGP_EVENT_ADD (peer, TCP_connection_open_failed);
     }
 }
@@ -911,6 +917,17 @@ bgp_notify_send_with_data (struct peer *
     zlog_debug ("%s send message type %d, length (incl. header) %d",
                        peer->host, BGP_MSG_NOTIFY, length);
 
+{               /*fsm error codes*/
+  if (sub_code == BGP_NOTIFY_UNEXPECTED_MESSAGE_IN_OPENSENT)
+                zlog_info ("Receive Unexpected Message in OpenSent State 
%s: type %u/%u",
+                   peer->host, code, sub_code);
+  else if(sub_code == BGP_NOTIFY_UNEXPECTED_MESSAGE_IN_OPENCONFIRM)
+                zlog_info ("Receive Unexpected Message in OpenConfirm 
State %s: type %u/%u",
+                   peer->host, code, sub_code);
+  else if(sub_code == BGP_NOTIFY_UNEXPECTED_MESSAGE_IN_ESTABLISHED)
+                zlog_info ("Receive Unexpected Message in Establish State 
%s: - %u",
+                   peer->host, sub_code);  
+}
   /* peer reset cause */
   if (sub_code != BGP_NOTIFY_CEASE_CONFIG_CHANGE)
     {


Kindly revert in case of any queries or doubts. We also look forward to 
your suggestions.

PS: Somehow the previous mails were converted into html format. I 
apologize for that. 

Thanks and regards,
Deepankar Gupta


=====-----=====-----=====
Notice: The information contained in this e-mail
message and/or attachments to it may contain 
confidential or privileged information. If you are 
not the intended recipient, any dissemination, use, 
review, distribution, printing or copying of the 
information contained in this e-mail message 
and/or attachments to it are strictly prohibited. If 
you have received this communication in error, 
please notify us by reply e-mail or telephone and 
immediately and permanently delete the message 
and any attachments. Thank you



--=_alternative 0019288165257CE5_=
Content-Type: text/html; charset="US-ASCII"

<font size=2 face="sans-serif">Dear David</font>
<br><font size=2 face="sans-serif">TCS had submitted the Patch for RFC
6608, let me know, when we can feedback.</font>
<br><font size=2 face="sans-serif"><br>
 Regards<br>
Deepankar Gupta<br>
</font>
<br><tt><font size=2><br>
Abstract of the RFC-6608:<br>
<br>
Currently, BGP (Border Gateway Protocol) Finite State Machine sends generalized
notification messages whenever it receives an unexpected message in any
of the states.<br>
<br>
Due to this the network operators find it hard to diagnose the BGP FSM
related issues. RFC-6608 defines subcodes for BGP Finite State Machine
Errors so that a BGP speaker send a notification message defining the error
code and the subcode in the current state.<br>
<br>
Steps to test/run the developed patch file on quagga-0.99.22.3 :<br>
<br>
As per the RFC, TCS has implemented subcodes for BGP Finite State Machine
Error.<br>
<br>
To test the notification/error messages for the various states in FSM,
we can do the following steps :<br>
<br>
1. For unexpected message in OpenSent State- we can comment the call to
the function bgp_packet_set_marker(s, BGP_MSG_OPEN) in bgp_open_send()
in bgp_packet.c.<br>
2. For unexpected message in OpenConfirm State- we can comment the call
to BGP_EVENT_ADD(peer, Receive_KEEPALIVE_message) in bgp_keepalive_receive()
in bgp_packet.c.<br>
3.For unexpected message in Established State- we can comment the call
to the function bgp_packet_set_marker(s, BGP_MSG_UPDATE) in bgp_update_packet()
in bgp_packet.c.<br>
</font></tt>
<br><tt><font size=2>Developed by: Kanchan Gupta (Kanchan.gupta1@tcs.com)</font></tt>
<br><tt><font size=2>Signed off by: Deepankar Gupta(deepankar.gupta@tcs.com)<br>
<br>
The in-line Patch is as follows :<br>
<br>
diff -upwbNr quagga-0.99.22.3/bgpd/bgp_debug.c quagga-0.99.22.3_rfc6608/bgpd/bgp_debug.c<br>
--- quagga-0.99.22.3/bgpd/bgp_debug.c &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp; &nbsp; 2013-07-30 20:17:01.000000000 +0530<br>
+++ quagga-0.99.22.3_rfc6608/bgpd/bgp_debug.c &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp; &nbsp; 2014-01-28 10:22:41.000000000 +0530<br>
@@ -95,6 +95,17 @@ static const struct message bgp_notify_m<br>
 };<br>
 static const int bgp_notify_msg_max = BGP_NOTIFY_MAX;<br>
 <br>
+<br>
+static const struct message bgp_notify_fsm_msg[] = <br>
+{<br>
+ &nbsp;{ BGP_NOTIFY_FINITE_STATE_MACHINE_ERROR, &quot;Finite State Machine
Error&quot;},<br>
+ &nbsp;{ BGP_NOTIFY_UNEXPECTED_MESSAGE_IN_OPENSENT, &quot;Unexpected Message
In OpenSent State&quot;},<br>
+ &nbsp;{ BGP_NOTIFY_UNEXPECTED_MESSAGE_IN_OPENCONFIRM, &quot;Unexpected
Message In OpenConfirm State&quot;},<br>
+ &nbsp;{ BGP_NOTIFY_UNEXPECTED_MESSAGE_IN_ESTABLISHED, &quot;Unexpected
Message In Established State&quot;},<br>
+};<br>
+static const int bgp_notify_fsm_msg_max = BGP_NOTIFY_FSM_MAX;<br>
+<br>
+<br>
 static const struct message bgp_notify_head_msg[] = <br>
 {<br>
 &nbsp; { BGP_NOTIFY_HEADER_NOT_SYNC, &quot;/Connection Not Synchronized&quot;},<br>
@@ -266,6 +277,8 @@ bgp_notify_print(struct peer *peer, stru<br>
 &nbsp; &nbsp; case BGP_NOTIFY_HOLD_ERR:<br>
 &nbsp; &nbsp; &nbsp; break;<br>
 &nbsp; &nbsp; case BGP_NOTIFY_FSM_ERR:<br>
+ &nbsp; &nbsp; &nbsp;subcode_str = LOOKUP_DEF (bgp_notify_fsm_msg, bgp_notify-&gt;subcode,<br>
+ &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&quot;Unrecognized Error Subcode&quot;);<br>
 &nbsp; &nbsp; &nbsp; break;<br>
 &nbsp; &nbsp; case BGP_NOTIFY_CEASE:<br>
 &nbsp; &nbsp; &nbsp; subcode_str = LOOKUP_DEF (bgp_notify_cease_msg, bgp_notify-&gt;subcode,<br>
diff -upwbNr quagga-0.99.22.3/bgpd/bgpd.h quagga-0.99.22.3_rfc6608/bgpd/bgpd.h<br>
--- quagga-0.99.22.3/bgpd/bgpd.h &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp; 2013-07-30 20:17:01.000000000 +0530<br>
+++ quagga-0.99.22.3_rfc6608/bgpd/bgpd.h &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp; &nbsp; 2014-02-03 14:44:22.000000000 +0530<br>
@@ -654,6 +654,15 @@ struct bgp_nlri<br>
 <br>
 #define BGP_NOTIFY_SUBCODE_UNSPECIFIC &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp;0<br>
 <br>
+<br>
+/* BGP_NOTIFY_FSM_ERR sub codes. &nbsp;*/<br>
+#define BGP_NOTIFY_FINITE_STATE_MACHINE_ERROR &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp;0<br>
+#define BGP_NOTIFY_UNEXPECTED_MESSAGE_IN_OPENSENT &nbsp; &nbsp; &nbsp;
&nbsp;1<br>
+#define BGP_NOTIFY_UNEXPECTED_MESSAGE_IN_OPENCONFIRM &nbsp; &nbsp; 2<br>
+#define BGP_NOTIFY_UNEXPECTED_MESSAGE_IN_ESTABLISHED &nbsp; &nbsp; 3<br>
+#define BGP_NOTIFY_FSM_MAX &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; 4<br>
+<br>
+<br>
 /* BGP_NOTIFY_HEADER_ERR sub codes. &nbsp;*/<br>
 #define BGP_NOTIFY_HEADER_NOT_SYNC &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; 1<br>
 #define BGP_NOTIFY_HEADER_BAD_MESLEN &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; 2<br>
diff -upwbNr quagga-0.99.22.3/bgpd/bgp_fsm.c quagga-0.99.22.3_rfc6608/bgpd/bgp_fsm.c<br>
--- quagga-0.99.22.3/bgpd/bgp_fsm.c &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp; &nbsp; 2013-07-30 20:17:01.000000000 +0530<br>
+++ quagga-0.99.22.3_rfc6608/bgpd/bgp_fsm.c &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp; &nbsp; 2014-02-20 15:06:13.000000000 +0530<br>
@@ -1086,12 +1086,38 @@ bgp_event (struct thread *thread)<br>
 &nbsp; /* Logging this event. */<br>
 &nbsp; next = FSM [peer-&gt;status -1][event - 1].next_state;<br>
 <br>
+ &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
<br>
 &nbsp; if (BGP_DEBUG (fsm, FSM) &amp;&amp; peer-&gt;status != next)<br>
+ &nbsp;{<br>
+ &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; if (peer-&gt;status == OpenSent &amp;&amp; next != OpenConfirm &nbsp;)<br>
+ &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; {<br>
+ &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
printf(&quot;\n&quot;);<br>
+ &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
bgp_notify_send (peer, BGP_NOTIFY_FSM_ERR, <br>
+ &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp; BGP_NOTIFY_UNEXPECTED_MESSAGE_IN_OPENSENT);<br>
+ &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
printf(&quot;\n&quot;);<br>
+ &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; }<br>
+ &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; else if (peer-&gt;status == OpenConfirm &amp;&amp; next != Established
&nbsp;)<br>
+ &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; {<br>
+ &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
printf(&quot;\n&quot;);<br>
+ &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
bgp_notify_send (peer, BGP_NOTIFY_FSM_ERR, <br>
+ &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp; BGP_NOTIFY_UNEXPECTED_MESSAGE_IN_OPENCONFIRM);<br>
+ &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
printf(&quot;\n&quot;);<br>
+ &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; }<br>
+ &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; else if (peer-&gt;status == Established &amp;&amp; next == Clearing
)<br>
+ &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; {<br>
+ &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp;printf(&quot;\n&quot;);<br>
+ &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp;bgp_notify_send (peer, BGP_NOTIFY_FSM_ERR, <br>
+ &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp; BGP_NOTIFY_UNEXPECTED_MESSAGE_IN_ESTABLISHED);<br>
+ &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp;printf(&quot;\n&quot;);<br>
+ &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; }<br>
+ &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
else if(BGP_DEBUG (fsm, FSM) &amp;&amp; peer-&gt;status != next)<br>
 &nbsp; &nbsp; plog_debug (peer-&gt;log, &quot;%s [FSM] %s (%s-&gt;%s)&quot;,
peer-&gt;host, <br>
 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp; bgp_event_str[event],<br>
 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp; LOOKUP (bgp_status_msg, peer-&gt;status),<br>
 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp; LOOKUP (bgp_status_msg, next));<br>
 <br>
+ &nbsp;}<br>
+<br>
 &nbsp; /* Call function. */<br>
 &nbsp; if (FSM [peer-&gt;status -1][event - 1].func)<br>
 &nbsp; &nbsp; ret = (*(FSM [peer-&gt;status - 1][event - 1].func))(peer);<br>
diff -upwbNr quagga-0.99.22.3/bgpd/bgp_packet.c quagga-0.99.22.3_rfc6608/bgpd/bgp_packet.c<br>
--- quagga-0.99.22.3/bgpd/bgp_packet.c &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp; &nbsp; 2014-02-11 14:49:05.000000000 +0530<br>
+++ quagga-0.99.22.3_rfc6608/bgpd/bgp_packet.c &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp; &nbsp; 2014-02-20 15:15:29.000000000 +0530<br>
@@ -131,8 +131,11 @@ bgp_connect_check (struct peer *peer)<br>
 &nbsp; else<br>
 &nbsp; &nbsp; {<br>
 &nbsp; &nbsp; &nbsp; if (BGP_DEBUG (events, EVENTS))<br>
+ &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; {<br>
 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp;plog_debug (peer-&gt;log, &quot;%s [Event] Connect failed (%s)&quot;,<br>
 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp;peer-&gt;host, safe_strerror (errno));<br>
+ &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp;<br>
+ &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; }<br>
 &nbsp; &nbsp; &nbsp; BGP_EVENT_ADD (peer, TCP_connection_open_failed);<br>
 &nbsp; &nbsp; }<br>
 }<br>
@@ -911,6 +917,17 @@ bgp_notify_send_with_data (struct peer *<br>
 &nbsp; &nbsp; zlog_debug (&quot;%s send message type %d, length (incl.
header) %d&quot;,<br>
 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp; peer-&gt;host, BGP_MSG_NOTIFY, length);<br>
 <br>
+{ &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
/*fsm error codes*/<br>
+ &nbsp;if (sub_code == BGP_NOTIFY_UNEXPECTED_MESSAGE_IN_OPENSENT)<br>
+ &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
zlog_info (&quot;Receive Unexpected Message in OpenSent State %s: type
%u/%u&quot;,<br>
+ &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; peer-&gt;host,
code, sub_code);<br>
+ &nbsp;else if(sub_code == BGP_NOTIFY_UNEXPECTED_MESSAGE_IN_OPENCONFIRM)<br>
+ &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
zlog_info (&quot;Receive Unexpected Message in OpenConfirm State %s: type
%u/%u&quot;,<br>
+ &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; peer-&gt;host,
code, sub_code);<br>
+ &nbsp;else if(sub_code == BGP_NOTIFY_UNEXPECTED_MESSAGE_IN_ESTABLISHED)<br>
+ &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
zlog_info (&quot;Receive Unexpected Message in Establish State %s: - %u&quot;,<br>
+ &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; peer-&gt;host,
sub_code); &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp;<br>
+}<br>
 &nbsp; /* peer reset cause */<br>
 &nbsp; if (sub_code != BGP_NOTIFY_CEASE_CONFIG_CHANGE)<br>
 &nbsp; &nbsp; {<br>
<br>
<br>
Kindly revert in case of any queries or doubts. We also look forward to
your suggestions.<br>
<br>
PS: Somehow the previous mails were converted into html format. I apologize
for that. <br>
<br>
Thanks and regards,<br>
Deepankar Gupta<br>
</font></tt>
<br>
<br><p>=====-----=====-----=====<br>
Notice: The information contained in this e-mail<br>
message and/or attachments to it may contain <br>
confidential or privileged information. If you are <br>
not the intended recipient, any dissemination, use, <br>
review, distribution, printing or copying of the <br>
information contained in this e-mail message <br>
and/or attachments to it are strictly prohibited. If <br>
you have received this communication in error, <br>
please notify us by reply e-mail or telephone and <br>
immediately and permanently delete the message <br>
and any attachments. Thank you</p>

<p></p>
--=_alternative 0019288165257CE5_=--




_______________________________________________
Quagga-dev mailing list
Quagga-dev@lists.quagga.net
https://lists.quagga.net/mailman/listinfo/quagga-dev


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic