From Sergey V. Lobanov via https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=6128
authoralagoutte <alagoutte@f5534014-38df-0310-8fa8-9805f1628bb7>
Wed, 17 Aug 2011 18:09:27 +0000 (18:09 +0000)
committeralagoutte <alagoutte@f5534014-38df-0310-8fa8-9805f1628bb7>
Wed, 17 Aug 2011 18:09:27 +0000 (18:09 +0000)
Wireshark doesn't decode BGP.MP_REACH_NLRI.NLRI when RD type is 2(defined in
RFC4364:4.2)

From me:
 Add RD type 2 (FORMAT_AS4_LOC) (not tested... based only on RFC spec..)

git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@38589 f5534014-38df-0310-8fa8-9805f1628bb7

epan/dissectors/packet-bgp.c

index c02014f8d32c057ae860edd04e90cf41f5d36cd7..06c17bbb628545125f29dda14729b61fdf4daeff 100644 (file)
@@ -567,6 +567,14 @@ mp_addr_to_str (guint16 afi, guint8 safi, tvbuff_t *tvb, gint offset, emem_strbu
                                              tvb_get_ntohs(tvb, offset + 6),
                                              ip_to_str((guint8 *)&ip4addr2));
                             break ;
+                        case FORMAT_AS4_LOC:
+                            length = 8 + sizeof(ip4addr);
+                            ip4addr = tvb_get_ipv4(tvb, offset + 8);  /* Next Hop   */
+                            ep_strbuf_printf(strbuf, "Empty Label Stack RD=%u:%u IPv4=%s",
+                                             tvb_get_ntohl(tvb, offset + 2),
+                                             tvb_get_ntohs(tvb, offset + 6),
+                                             ip_to_str((guint8 *)&ip4addr));
+                            break ;
                         default:
                             length = 0 ;
                             ep_strbuf_printf(strbuf, "Unknown (0x%04x) labeled VPN IPv4 address format",rd_type);