hi all ,<br><br>
We are not able to figure out what the error is coz haven&#39;t&nbsp; use&nbsp; those(buflen_error &amp; rcvlen_error) lables&nbsp; !! <br><br>***************************************************************************************************** 
<br>In pim_bidir_df.cc<br><br>int<br>PimVif::pim_bidir_df_send(const IPvX&amp; src, const IPvX&amp; dst,<br>&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp; uint8_t message_type,uint8_t message_subtype , buffer_t *buffer,<br>&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp; string&amp; error_msg)<br>{
<br>&nbsp;&nbsp;&nbsp; uint8_t pim_vt;<br>&nbsp;&nbsp;&nbsp; uint16_t cksum;<br>&nbsp;&nbsp;&nbsp; uint16_t cksum2 = 0;<br>&nbsp;&nbsp;&nbsp; int ip_tos = -1;<br>&nbsp;&nbsp;&nbsp; int ret_value;<br>&nbsp;&nbsp;&nbsp; size_t datalen;<br>&nbsp;&nbsp;&nbsp; int ttl = MINTTL;<br>&nbsp;&nbsp;&nbsp; bool is_router_alert = true;<br><br>&nbsp;&nbsp;&nbsp; //<br>
&nbsp;&nbsp;&nbsp; // Prepare the PIM-BIDIR messages are Multicast with TTL 1 to the &quot;ALL-PIm-ROUTERS&quot; header<br>&nbsp;&nbsp;&nbsp; //All DF election BIDIR-PIM control message share the common header.<br><br>&nbsp;&nbsp;&nbsp; datalen = BUFFER_DATA_SIZE(buffer);
<br>&nbsp;&nbsp;&nbsp; BUFFER_RESET_TAIL(buffer);<br>&nbsp;&nbsp;&nbsp; //<br>&nbsp;&nbsp;&nbsp; pim_vt = PIM_MAKE_VT(proto_version(), message_type);<br>&nbsp;&nbsp;&nbsp; BUFFER_PUT_OCTET(pim_vt, buffer);&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;// PIM version and message type<br>&nbsp;&nbsp; &nbsp;<br>&nbsp;&nbsp;&nbsp; switch(message_subtype){
<br>&nbsp;&nbsp; &nbsp;case DF_OFFER :&nbsp;&nbsp; &nbsp;<br>&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;XLOG_INFO(&quot;ash : DF_OFFER&quot;);<br>&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;BUFFER_PUT_OCTET(DF_OFFER, buffer);&nbsp;&nbsp; &nbsp;// Offer + Reserved <br>&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;//BUFFER_PUT_HOST_16(DF_OFFER, buffer);<br>&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;break;
<br>&nbsp;&nbsp; &nbsp;case DF_WINNER :&nbsp;&nbsp; &nbsp;<br>&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;XLOG_INFO(&quot;ash : DF_WINNER&quot;);<br>&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;BUFFER_PUT_OCTET(DF_WINNER, buffer);&nbsp;&nbsp; &nbsp;// Winner + Reserved <br>//&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;BUFFER_PUT_HOST_16(DF_WINNER, buffer);<br>&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;break;
<br>&nbsp;&nbsp; &nbsp;case DF_BACKOFF :&nbsp;&nbsp; &nbsp;<br>&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;XLOG_INFO(&quot;ash : DF_BACKOFF&quot;);<br>&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;BUFFER_PUT_OCTET(DF_BACKOFF, buffer);&nbsp;&nbsp; &nbsp;// Backoff + Reserved <br>&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;break;<br>&nbsp;&nbsp; &nbsp;case DF_PASS&nbsp;&nbsp; &nbsp;:&nbsp;&nbsp; &nbsp;<br>&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;XLOG_INFO(&quot;ash : DF_PASS&quot;);
<br>&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;BUFFER_PUT_OCTET(DF_PASS, buffer);&nbsp;&nbsp; &nbsp;// Pass + Reserved <br>&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;break;<br>&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;<br>&nbsp;&nbsp; &nbsp;default :<br>&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;XLOG_INFO(&quot;ash : Default&quot;);<br>&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;BUFFER_PUT_OCTET(0xb, buffer);<br>&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;break;
<br><br>}<br><br>&nbsp;&nbsp;&nbsp; BUFFER_PUT_HOST_16(0, buffer);&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;// Zero the checksum field<br><br><br>&nbsp;// Restore the buffer to include the data<br>&nbsp;&nbsp;&nbsp; BUFFER_RESET_TAIL(buffer);<br>&nbsp;&nbsp;&nbsp; BUFFER_PUT_SKIP(datalen, buffer);<br>&nbsp;&nbsp; &nbsp;
<br>&nbsp;&nbsp;&nbsp; //<br>&nbsp;&nbsp;&nbsp; // Compute the checksum<br>&nbsp;&nbsp;&nbsp; //<br>&nbsp;&nbsp;&nbsp; if (is_ipv6()) {<br>&nbsp;&nbsp; &nbsp;//<br>&nbsp;&nbsp; &nbsp;// XXX: The checksum for IPv6 includes the IPv6 &quot;pseudo-header&quot;<br>&nbsp;&nbsp; &nbsp;// as described in RFC 2460.<br>&nbsp;&nbsp; &nbsp;//<br>&nbsp;&nbsp; &nbsp;size_t ph_len;
<br>&nbsp;&nbsp; &nbsp;if (message_type == PIM_REGISTER)<br>&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp; ph_len = PIM_REGISTER_HEADER_LENGTH;<br>&nbsp;&nbsp; &nbsp;else<br>&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp; ph_len = BUFFER_DATA_SIZE(buffer);<br>&nbsp;&nbsp; &nbsp;cksum2 = calculate_ipv6_pseudo_header_checksum(src, dst, ph_len,<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; IPPROTO_PIM);<br>&nbsp;&nbsp;&nbsp; }<br>&nbsp;&nbsp; &nbsp;<br>&nbsp;&nbsp;&nbsp; // XXX: The checksum for PIM_REGISTER excludes the encapsulated data packet<br>&nbsp;&nbsp;&nbsp; switch (message_type) {<br>&nbsp;&nbsp;&nbsp; case PIM_REGISTER:<br>&nbsp;&nbsp; &nbsp;cksum = INET_CKSUM(BUFFER_DATA_HEAD(buffer),
<br>&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; PIM_REGISTER_HEADER_LENGTH);<br>&nbsp;&nbsp; &nbsp;break;<br>&nbsp;&nbsp;&nbsp; default:<br>&nbsp;&nbsp; &nbsp;cksum = INET_CKSUM(BUFFER_DATA_HEAD(buffer), BUFFER_DATA_SIZE(buffer));<br>&nbsp;&nbsp; &nbsp;break;<br>&nbsp;&nbsp;&nbsp; }<br>&nbsp;&nbsp; &nbsp;<br>&nbsp;&nbsp;&nbsp; cksum = INET_CKSUM_ADD(cksum, cksum2);
<br>&nbsp;&nbsp;&nbsp; BUFFER_COPYPUT_INET_CKSUM(cksum, buffer, 2);&nbsp;&nbsp; &nbsp;// XXX: the ckecksum&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp; &nbsp;<br>&nbsp;&nbsp;&nbsp; //<br>&nbsp;&nbsp;&nbsp; // Send the message<br>&nbsp;&nbsp;&nbsp; //<br>&nbsp;&nbsp;&nbsp; ret_value = pim_node().pim_send(vif_index(), src, dst, ttl, ip_tos,<br>&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp; is_router_alert, buffer, error_msg);
<br>&nbsp;&nbsp; &nbsp;<br>&nbsp;&nbsp; &nbsp;return (ret_value);<br>&nbsp; <br><br>}<br><br><br>/**<br>&nbsp;* PimVif::pim__bidir_df_recv:<br>&nbsp;* @pim_nbr: The PIM neighbor message originator (or NULL if not a neighbor).<br>&nbsp;* @src: The message source address.<br>
&nbsp;* @dst: The message destination address.<br>&nbsp;* @buffer: The buffer with the message.<br>&nbsp;* <br>&nbsp;* Receive PIM_ASSERT message.<br>&nbsp;* <br>&nbsp;* Return value: %XORP_OK on success, otherwise %XORP_ERROR.<br>&nbsp;**/<br>int<br>PimVif::pim_bidir_df_recv(const IPvX&amp; src,const IPvX&amp; dst,int ip_ttl,
<br>&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp; int ip_tos,buffer_t *buffer)<br>{<br>&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;<br>&nbsp;&nbsp;&nbsp; uint8_t pim_vt;<br>&nbsp;&nbsp;&nbsp; uint8_t message_type, proto_version,message_subtype;<br>&nbsp;&nbsp; &nbsp;<br>&nbsp;&nbsp;&nbsp; // Ignore my own PIM messages<br>//&nbsp;&nbsp;&nbsp; if (pim_node().is_my_addr(src))
<br>//&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;return (XORP_ERROR);<br>&nbsp;&nbsp; &nbsp;<br>&nbsp;&nbsp;&nbsp; //<br>&nbsp;&nbsp;&nbsp; // Message length check.<br>&nbsp;&nbsp;&nbsp; //<br><br>&nbsp;&nbsp;&nbsp; if (BUFFER_DATA_SIZE(buffer) &lt; PIM_MINLEN) {<br>&nbsp;&nbsp; &nbsp;XLOG_WARNING(&quot;RX packet from %s to %s on vif %s: &quot;
<br>&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &quot;too short data field (%u bytes)&quot;,<br>&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp; cstring(src), cstring(dst),<br>&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp; name().c_str(),<br>&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp; XORP_UINT_CAST(BUFFER_DATA_SIZE(buffer)));<br>&nbsp;&nbsp; &nbsp;++_pimstat_bad_length_messages;
<br>&nbsp;&nbsp; &nbsp;return (XORP_ERROR);<br>&nbsp;&nbsp;&nbsp; }<br>&nbsp;&nbsp; &nbsp;<br>&nbsp;&nbsp;&nbsp; //<br>&nbsp;&nbsp;&nbsp; // Parse the message<br>&nbsp;&nbsp;&nbsp; //<br><br><br>&nbsp;&nbsp;&nbsp; //<br>&nbsp;&nbsp;&nbsp; // Get the message type and PIM protocol version.<br>&nbsp;&nbsp;&nbsp; // XXX: First we need the message type to verify correctly the checksum.
<br>&nbsp;&nbsp;&nbsp; //<br><br>&nbsp;&nbsp;&nbsp; BUFFER_GET_OCTET(pim_vt, buffer);<br>&nbsp;&nbsp;&nbsp; BUFFER_GET_SKIP_REVERSE(1, buffer);&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;// Rewind back<br>&nbsp;&nbsp; &nbsp;<br>&nbsp;&nbsp; &nbsp;<br>proto_version = PIM_VT_V(pim_vt);<br><br><br>//&nbsp;&nbsp;&nbsp; BUFFER_GET_OCTET(pim_vt, buffer);
<br><br>&nbsp;&nbsp; &nbsp;<br>&nbsp;&nbsp;&nbsp; while (BUFFER_DATA_SIZE(buffer) &gt; 0) {<br>&nbsp;&nbsp; &nbsp;BUFFER_GET_OCTET(pim_vt, buffer);<br>&nbsp;&nbsp; &nbsp;message_type = PIM_VT_T(pim_vt);<br>&nbsp;&nbsp; &nbsp;switch(message_type)<br>&nbsp;&nbsp; &nbsp;{<br>&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;case PIM_ALL_DF_ELECTION : <br>
&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;XLOG_INFO(&quot;ash :&nbsp; PIM_ALL_DF_ELECTION recvd&quot;);<br>&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;break;<br><br>&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;default :<br>&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;XLOG_INFO(&quot;ash : Wrong PIM_ALL_DF_ELECTION Election Recvd&quot;);
<br>&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;break;<br><br>&nbsp;&nbsp; &nbsp;}&nbsp;&nbsp; &nbsp;<br><br><br>&nbsp;&nbsp; &nbsp;BUFFER_GET_OCTET(message_subtype, buffer);<br>&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;switch(message_subtype)<br>&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;{<br>&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;case DF_OFFER : <br>&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;XLOG_INFO(&quot;ash : DF_OFFER recvd&quot;);
<br>&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;break;<br><br>&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;case DF_WINNER : <br>&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;XLOG_INFO(&quot;ash : DF_WINNER recvd&quot;);<br>&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;break;<br><br>&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;case DF_BACKOFF : <br>&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;XLOG_INFO(&quot;ash : DF_BACKOFF recvd&quot;);
<br>&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;break;<br><br>&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;case DF_PASS : <br>&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;XLOG_INFO(&quot;ash : DF_PASS recvd&quot;);<br>&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;break;<br><br>&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;default :<br>&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;XLOG_INFO(&quot;ash : Wrong DF offers Election Recvd&quot;);
<br>&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;break;<br><br>&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;}<br>&nbsp;&nbsp; &nbsp;}<br>&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp; //<br>&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp; // TODO: check the TTL and TOS if we are running in secure mode<br>&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp; //<br>&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp; UNUSED(ip_ttl);<br>&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp; UNUSED(ip_tos);<br>#if 0
<br>&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp; if (ip_ttl != MINTTL) {<br>&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;XLOG_WARNING(&quot;RX %s from %s to %s on vif %s: &quot;<br>&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &quot;ip_ttl = %d instead of %d&quot;,<br>&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp; PIMTYPE2ASCII(message_type),<br>&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp; cstring(src), cstring(dst),
<br>&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp; name().c_str(),<br>&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ip_ttl, MINTTL);<br>&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;ret_value = XORP_ERROR;<br>&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;goto ret_label;<br>&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp; }<br>#endif // 0<br><br>&nbsp;&nbsp;&nbsp; return (XORP_OK);<br>&nbsp;&nbsp; &nbsp;<br><br><br><br>}<br>
<br>********************************************************************************************************<br>error :<br><br>pim_bidir_df.cc:110: error: label &#39;buflen_error&#39; used but not defined<br>pim_bidir_df.cc: In member function &#39;int PimVif::pim_bidir_df_recv(const IPvX&amp;, const IPvX&amp;, int, int, buffer_t*)&#39;:
<br>pim_bidir_df.cc:286: error: label &#39;rcvlen_error&#39; used but not defined<br>gmake[2]: *** [pim_bidir_df.lo] Error 1<br>gmake[2]: Leaving directory `/root/project/df/xorp-1.3/pim&#39;<br>gmake[1]: *** [all-recursive] Error 1
<br>gmake[1]: Leaving directory `/root/project/df/xorp-1.3&#39;<br>gmake: *** [all] Error 2<br><br><br>********************************************************************************************************<br>Error shown @ following lines : 
<br><br>Line No. 110 : BUFFER_PUT_OCTET(pim_vt, buffer);&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;// PIM version and message type<br><br>Line No. 286 : BUFFER_GET_OCTET(pim_vt, buffer);<br><br>************************************************************************
<br><br>Thank you,<br>ashish<br>