]> git.ipfire.org Git - thirdparty/bird.git/commitdiff
Use correct flags for the LOCAL_PREF attribute.
authorMartin Mares <mj@ucw.cz>
Thu, 11 May 2000 12:20:07 +0000 (12:20 +0000)
committerMartin Mares <mj@ucw.cz>
Thu, 11 May 2000 12:20:07 +0000 (12:20 +0000)
When an invalid attribute is found, copy the entire attribute to the data
section of the NOTIFICATION message.

proto/bgp/attrs.c

index ee9d597e32dce38f3373ef19ecb9de5c16111484..ce11202813afd1f84c61c960d2a48780c16b95ea 100644 (file)
@@ -118,7 +118,7 @@ static struct attr_desc bgp_attr_table[] = {
     bgp_check_next_hop, NULL },
   { "med", 4, BAF_OPTIONAL, EAF_TYPE_INT, 0,                                   /* BA_MULTI_EXIT_DISC */
     NULL, NULL },
-  { "local_pref", 4, BAF_OPTIONAL, EAF_TYPE_INT, 0,                            /* BA_LOCAL_PREF */
+  { "local_pref", 4, BAF_TRANSITIVE, EAF_TYPE_INT, 0,                          /* BA_LOCAL_PREF */
     NULL, NULL },
   { "atomic_aggr", 0, BAF_TRANSITIVE, EAF_TYPE_OPAQUE, 1,                      /* BA_ATOMIC_AGGR */
     NULL, NULL },
@@ -886,7 +886,7 @@ malformed:
   return NULL;
 
 err:
-  bgp_error(conn, 3, errcode, z-2, l+2);
+  bgp_error(conn, 3, errcode, attr_start, z+l-attr_start);
   return NULL;
 }