]> git.puffer.fish Git - matthieu/frr.git/commitdiff
bgpd: bgp_attr_flags_diagnose shouldn't assert
authorPaul Jakma <paul@quagga.net>
Tue, 27 Mar 2012 10:54:04 +0000 (11:54 +0100)
committerPaul Jakma <paul@quagga.net>
Tue, 27 Mar 2012 10:54:04 +0000 (11:54 +0100)
* bgpd/bgp_attr.c: (bgp_attr_flags_diagnose) debug code for error-handling
  paths probably shouldn't assert, instead it should just log that there
  was no problem.

bgpd/bgp_attr.c

index c21655c0725afaf6380b7d3bb26241d7efd2e0e6..0d82aba04edc7164e14e9cf89d9fbca85db01582 100644 (file)
@@ -809,7 +809,14 @@ bgp_attr_flags_diagnose (struct bgp_attr_parser_args *args,
             attr_flag_str[i].str);
       seen = 1;
     }
-  assert (seen);
+  if (!seen)
+    {
+      zlog (args->peer->log, LOG_DEBUG,
+            "Strange, %s called for attr %s, but no problem found with flags"
+            " (real flags 0x%x, desired 0x%x)",
+            __func__, LOOKUP (attr_str, attr_code),
+            real_flags, desired_flags);
+    }
 }
 
 /* Required flags for attributes. EXTLEN will be masked off when testing,