Ethereal-dev: [Ethereal-dev] fixing bug 306 [PATCH]

Note: This archive is from the project's previous web site, ethereal.com. This list is no longer active.

From: Jaap Keuter <jaap.keuter@xxxxxxxxx>
Date: Thu, 15 Dec 2005 23:38:06 +0100 (CET)
Hi list,

Looking at RFC 3344 it seems that bug 306 is legit.
This patch fixes it.

Thanx,
Jaap
Index: packet-ip.c
===================================================================
--- packet-ip.c	(revision 16810)
+++ packet-ip.c	(working copy)
@@ -1717,6 +1717,7 @@
       break;
     case ICMP_RTRADVERT:
       switch (icmp_code) {
+      case 0: /* Mobile-Ip */
       case 16: /* Mobile-Ip */
         type_str="Mobile IP Advertisement";
         break;
@@ -1912,7 +1913,7 @@
 	    proto_tree_add_text(icmp_tree, tvb, 12 + (i*8), 4,
 	      "Preference level: %d", tvb_get_ntohl(tvb, 12 + (i*8)));
 	  }
-	  if (icmp_code == 16) {
+	  if ((icmp_code == 0) || (icmp_code == 16)) {
 		/* Mobile-Ip */
 		dissect_mip_extensions(tvb, 8 + i*8, icmp_tree);
 	  }