bgpd: attr_parse call to attr_malformed should deal with PROCEED error case

* bgpd/bgp_attr.c: (bgp_attr_parse) the invalid flag check call to
  bgp_attr_malformed is pretty useless if it doesn't actually allow
  for the PROCEED non-error case.
diff --git a/bgpd/bgp_attr.c b/bgpd/bgp_attr.c
index 6670416..c21655c 100644
--- a/bgpd/bgp_attr.c
+++ b/bgpd/bgp_attr.c
@@ -738,10 +738,10 @@
                     + args->total);
   
   switch (args->type) {
-    /* where an optional attribute is inconsequential, e.g. it does not affect
-     * route selection, and can be safely ignored then any such attributes
-     * which are malformed should just be ignored and the route processed as
-     * normal.
+    /* where an attribute is relatively inconsequential, e.g. it does not
+     * affect route selection, and can be safely ignored, then any such
+     * attributes which are malformed should just be ignored and the route
+     * processed as normal.
      */
     case BGP_ATTR_AS4_AGGREGATOR:
     case BGP_ATTR_AGGREGATOR:
@@ -749,7 +749,7 @@
       return BGP_ATTR_PARSE_PROCEED;
     
     /* Core attributes, particularly ones which may influence route
-     * selection should always cause session resets
+     * selection, should always cause session resets
      */
     case BGP_ATTR_ORIGIN:
     case BGP_ATTR_AS_PATH:
@@ -1823,9 +1823,15 @@
          Attribute Flags Error.  The Data field contains the erroneous
          attribute (type, length and value). */
       if (bgp_attr_flag_invalid (&attr_args))
-        return bgp_attr_malformed (&attr_args,
-                                   BGP_NOTIFY_UPDATE_ATTR_FLAG_ERR,
-                                   attr_args.total);
+        {
+          bgp_attr_parse_ret_t ret;
+          ret = bgp_attr_malformed (&attr_args,
+                                    BGP_NOTIFY_UPDATE_ATTR_FLAG_ERR,
+                                    attr_args.total);
+          if (ret == BGP_ATTR_PARSE_PROCEED)
+            continue;
+          return ret;
+        }
 
       /* OK check attribute and store it's value. */
       switch (type)