)]}'
{
  "commit": "835315bfb49bff2b2fb354f2075c6d6693c2a151",
  "tree": "b9cc49ef796bcb1e3836ff670da930765815acfa",
  "parents": [
    "3ecab4c8549574d09f8d8366098939a8ad3da6c4"
  ],
  "author": {
    "name": "Paul Jakma",
    "email": "paul@quagga.net",
    "time": "Wed Jan 18 12:28:30 2012 +0000"
  },
  "committer": {
    "name": "Paul Jakma",
    "email": "paul@quagga.net",
    "time": "Tue Feb 28 18:35:45 2012 +0000"
  },
  "message": "bgpd: Move up flag-check calls, parcel up attr-parser args, and other cleanups\n\n* bgp_attr.h: (struct bgp_attr_parser_args) Attribute parsing context,\n  containing common arguments.\n* bgp_attr.c: (general) Move the bgp_attr_flag_invalid flag-check calls up,\n  out of each individual attr parser function, to be done once in attr_parse.\n\n  Similarly move the calculation of the \u0027total\u0027 attribute length field up\n  to attr_parse.\n\n  Bundle together common arguments to attr-parsing functions and helpers\n  into (struct bgp_attr_parser_args), so it can be passed by reference down\n  the stack \u0026 also de-clutter the argument lists \u0026 make it easier to\n  add/modify the context for attr-parsing - add local const aliases to avoid\n  modifying body of code too much. This also should help avoid cut \u0026 paste\n  errors, where calls to helpers with hard-coded attribute types are pasted\n  to other functions but the code isn\u0027t changed.\n\n  (bgp_attr_flags_diagnose) as above.\n  (bgp_attr_flag_invalid) as above.\n  (bgp_attr_{origin,aspath,as4_path,nexthop,med,local_pref,atomic}) as above.\n  (bgp_attr_{aggregator,as4_aggregator,community,originator_id}) as above\n  (bgp_attr_{cluster_list,ext_communities},bgp_mp_{un,}reach_parse) as above\n  (bgp_attr_unknown) as above.\n\n  (bgp_attr_malformed) as above. Also, startp and length have to be\n  special-cased, because whether or not to send attribute data depends\n  on the particular error - a separate length argument, distinct from\n  args-\u003elength, indicates whether or not the attribute data should be sent\n  in the NOTIFY.\n  (bgp_attr_aspath_check) Call to bgp_attr_malformed is wrong here, there is\n  no attribute parsing context - e.g. the \u0027flag\u0027 argument is unlikely to be\n  right, remove it. Explicitly handle the error instead.\n  (bgp_attr_munge_as4_attrs) Flag argument is pointless.\n\n  As the comment notes, the check here is pointless as AS_PATH presence\n  already checked elsewhere.\n\n  (bgp_attr_parse) Do bgp_attr_flag_invalid call here.\n  Use (struct bgp_attr_parser_args) for args to attr parser functions.\n  Remove out-of-context \u0027flag\u0027 argument to as4 checking functions.\n",
  "tree_diff": [
    {
      "type": "modify",
      "old_id": "d8ca831a90b85dc22d3826cb9a89034ed2dd3a67",
      "old_mode": 33188,
      "old_path": "bgpd/bgp_attr.c",
      "new_id": "b02cfee356cc43e176d7a4df8312d63da9815934",
      "new_mode": 33188,
      "new_path": "bgpd/bgp_attr.c"
    },
    {
      "type": "modify",
      "old_id": "e6300740cf5f1b5fa0c0dae0ca704d43fb61d869",
      "old_mode": 33188,
      "old_path": "bgpd/bgp_attr.h",
      "new_id": "df87c863189b91ef6fdd3627c19972b0f13231c6",
      "new_mode": 33188,
      "new_path": "bgpd/bgp_attr.h"
    }
  ]
}
