)]}'
{
  "commit": "ca058a30b1ea57f83871ab4cf1c9a91ea4064d52",
  "tree": "ab38ab59bad607c9b41a093cb8b35bec766f30b3",
  "parents": [
    "2815e61ffbbf9c362896f3912d925cf78e125ee1"
  ],
  "author": {
    "name": "Paul Jakma",
    "email": "paul.jakma@sun.com",
    "time": "Thu Sep 14 02:58:49 2006 +0000"
  },
  "committer": {
    "name": "Paul Jakma",
    "email": "paul.jakma@sun.com",
    "time": "Thu Sep 14 02:58:49 2006 +0000"
  },
  "message": "[bgpd] Fix 0.99 shutdown regression, introduce Clearing and Deleted states\n\n2006-09-14 Paul Jakma \u003cpaul.jakma@sun.com\u003e\n\n\t* (general) Fix some niggly issues around \u0027shutdown\u0027 and clearing\n\t  by adding a Clearing FSM wait-state and a hidden \u0027Deleted\u0027\n\t  FSM state, to allow deleted peers to \u0027cool off\u0027 and hit 0\n\t  references. This introduces a slow memory leak of struct peer,\n\t  however that\u0027s more a testament to the fragility of the\n\t  reference counting than a bug in this patch, cleanup of\n\t  reference counting to fix this is to follow.\n\t* bgpd.h: Add Clearing, Deleted states and Clearing_Completed\n\t  and event.\n\t* bgp_debug.c: (bgp_status_msg[]) Add strings for Clearing and\n\t  Deleted.\n\t* bgp_fsm.h: Don\u0027t allow timer/event threads to set anything\n\t  for Deleted peers.\n\t* bgp_fsm.c: (bgp_timer_set) Add Clearing and Deleted. Deleted\n\t  needs to stop everything.\n\t  (bgp_stop) Remove explicit fsm_change_status call, the\n\t  general framework handles the transition.\n\t  (bgp_start) Log a warning if a start is attempted on a peer\n\t  that should stay down, trying to start a peer.\n\t  (struct .. FSM) Add Clearing_Completed\n\t  events, has little influence except when in state\n\t  Clearing to signal wait-state can end.\n\t  Add Clearing and Deleted states, former is a wait-state,\n\t  latter is a placeholder state to allow peers to disappear\n\t  quietly once refcounts settle.\n\t  (bgp_event) Try reduce verbosity of FSM state-change debug,\n\t  changes to same state are not interesting (Established-\u003eEstablished)\n\t  Allow NULL action functions in FSM.\n\t* bgp_packet.c: (bgp_write) Use FSM events, rather than trying\n\t  to twiddle directly with FSM state behind the back of FSM.\n\t  (bgp_write_notify) ditto.\n\t  (bgp_read) Remove the vague ACCEPT_PEER peer_unlock, or else\n\t  this patch crashes, now it leaks instead.\n\t* bgp_route.c: (bgp_clear_node_complete) Clearing_Completed\n\t  event, to end clearing.\n\t  (bgp_clear_route) See extensive comments.\n\t* bgpd.c: (peer_free) should only be called while in Deleted,\n\t  peer refcounting controls when peer_free is called.\n\t  bgp_sync_delete should be here, not in peer_delete.\n\t  (peer_delete) Initiate delete.\n\t  Transition to Deleted state manually.\n\t  When removing peer from indices that provide visibility of it,\n\t  take great care to be idempotent wrt the reference counting\n\t  of struct peer through those indices.\n\t  Use bgp_timer_set, rather than replicating.\n\t  Call to bgp_sync_delete isn\u0027t appropriate here, sync can be\n\t  referenced while shutting down and finishing deletion.\n\t  (peer_group_bind) Take care to be idempotent wrt list references\n\t  indexing peers.\n",
  "tree_diff": [
    {
      "type": "modify",
      "old_id": "482beedaa17ccb2da4a57bb5f816c7ab189eda14",
      "old_mode": 33188,
      "old_path": "bgpd/ChangeLog",
      "new_id": "02aaf3abfc84a22b529d6281d0268c7837ec0f5a",
      "new_mode": 33188,
      "new_path": "bgpd/ChangeLog"
    },
    {
      "type": "modify",
      "old_id": "1b398ee8b1b681334809827701c99cb2d18169dd",
      "old_mode": 33188,
      "old_path": "bgpd/bgp_debug.c",
      "new_id": "1e0fcd1fd333a0bba28437275fec1b1461df206e",
      "new_mode": 33188,
      "new_path": "bgpd/bgp_debug.c"
    },
    {
      "type": "modify",
      "old_id": "770a7911960a8535140f61450b5092b6d9aea81e",
      "old_mode": 33188,
      "old_path": "bgpd/bgp_fsm.c",
      "new_id": "bdb6517fdcc479af1cf30f32d3b6f3feff2c5617",
      "new_mode": 33188,
      "new_path": "bgpd/bgp_fsm.c"
    },
    {
      "type": "modify",
      "old_id": "e90f3b433c97eba851cea200fe2602240cef635a",
      "old_mode": 33188,
      "old_path": "bgpd/bgp_fsm.h",
      "new_id": "0a5d37157e441bdc9ecf0bb18a31227823a01804",
      "new_mode": 33188,
      "new_path": "bgpd/bgp_fsm.h"
    },
    {
      "type": "modify",
      "old_id": "8b024a1c0fd14c1350457cce07c6d18cc0cacacd",
      "old_mode": 33188,
      "old_path": "bgpd/bgp_packet.c",
      "new_id": "da59d32983daef561a52adbc254d3d2f1aafefb5",
      "new_mode": 33188,
      "new_path": "bgpd/bgp_packet.c"
    },
    {
      "type": "modify",
      "old_id": "2ce2ef4d81cfd8d31f28db1def0304da29bc38cf",
      "old_mode": 33188,
      "old_path": "bgpd/bgp_route.c",
      "new_id": "5dde41de7a0258e032907905e12376375fbe114a",
      "new_mode": 33188,
      "new_path": "bgpd/bgp_route.c"
    },
    {
      "type": "modify",
      "old_id": "ec4b6c224f211b1c05a368ebfb6d99fb671c33e2",
      "old_mode": 33188,
      "old_path": "bgpd/bgp_vty.c",
      "new_id": "b108164f3659850695fa73efd1ae419dc60ef7dd",
      "new_mode": 33188,
      "new_path": "bgpd/bgp_vty.c"
    },
    {
      "type": "modify",
      "old_id": "8ed598d282cd3431594e2fbddd0baa18693220d1",
      "old_mode": 33188,
      "old_path": "bgpd/bgpd.c",
      "new_id": "733b33a6aa42c0d7b6c9be4bfb82808d5ee0fb27",
      "new_mode": 33188,
      "new_path": "bgpd/bgpd.c"
    },
    {
      "type": "modify",
      "old_id": "b8ae30aeb3a4a3c0da79285e558a12b5639519e9",
      "old_mode": 33188,
      "old_path": "bgpd/bgpd.h",
      "new_id": "8b180a43230f414b488c05f15886e87f50e3f6da",
      "new_mode": 33188,
      "new_path": "bgpd/bgpd.h"
    }
  ]
}
