)]}'
{
  "commit": "9d3f9705d8b386ccf006c106967c700141e5d049",
  "tree": "9edfe2653741fa0f49ffef15bd66f5a522dcd025",
  "parents": [
    "3b96b78136d04ddb7e39d86577cad75acb25237a"
  ],
  "author": {
    "name": "Andrew Certain",
    "email": "certain@amazon.com",
    "time": "Wed Nov 07 23:50:07 2012 +0000"
  },
  "committer": {
    "name": "David Lamparter",
    "email": "equinox@opensourcerouting.org",
    "time": "Fri Nov 30 21:10:00 2012 +0100"
  },
  "message": "bgpd: add replace-as modifier for BGP neighbor\n\nAdded replace-as modifier for BGP neighbors when using\nlocal-as. If the replace-as modifier is specified, only the\nreplacement AS as specified by the local-as modifier is\nprepended to the AS_PATH, not the process\u0027s AS.\n\nIn bgp_attr.c, I decided that\n\nif (peer-\u003echange_local_as) {\n  /* If replace-as is specified, we only use the change_local_as when\n     advertising routes. */\n  if( ! CHECK_FLAG (peer-\u003eflags, PEER_FLAG_LOCAL_AS_REPLACE_AS) ) {\n    aspath \u003d aspath_add_seq (aspath, peer-\u003elocal_as);\n  }\n  aspath \u003d aspath_add_seq (aspath, peer-\u003echange_local_as);\n} else {\n  aspath \u003d aspath_add_seq (aspath, peer-\u003elocal_as);\n}\n\nwas clearer than the alternative that didn\u0027t duplicate the prepending of the\nprocess\u0027s AS:\n\n/* First, append the process local AS unless we have an alternate local_as\n * and we\u0027re replacing it (as opposed to just prepending it). */\nif (! (peer-\u003echange_local_as\n       \u0026\u0026 CHECK_FLAG (peer-\u003eflags, PEER_FLAG_LOCAL_AS_REPLACE_AS) ) ) {\n  aspath \u003d aspath_add_seq (aspath, peer-\u003elocal_as);\n}\n\nif (peer-\u003echange_local_as)\n  aspath \u003d aspath_add_seq (aspath, peer-\u003echange_local_as);\n}\n\nBut I could be convinced otherwise.\n\nSigned-off-by: David Lamparter \u003cequinox@opensourcerouting.org\u003e\n",
  "tree_diff": [
    {
      "type": "modify",
      "old_id": "cdc99ab3ac60ed8ddb1b3d1c655bb5334c707f58",
      "old_mode": 33188,
      "old_path": "bgpd/bgp_attr.c",
      "new_id": "f48a5438b6b663ddbbb8887b8eb7f557fafea958",
      "new_mode": 33188,
      "new_path": "bgpd/bgp_attr.c"
    },
    {
      "type": "modify",
      "old_id": "cb7ff1fa36d0b2a1bcf0d627ff0385e75d931031",
      "old_mode": 33188,
      "old_path": "bgpd/bgp_vty.c",
      "new_id": "0f28894819b0abf529d5a83ee990ee1f3c48b5d2",
      "new_mode": 33188,
      "new_path": "bgpd/bgp_vty.c"
    },
    {
      "type": "modify",
      "old_id": "69c8c0a33dddae4aceb90a41344fe7683523f669",
      "old_mode": 33188,
      "old_path": "bgpd/bgpd.c",
      "new_id": "908bdd94f88b392105b4dca887ca5579f3840e3d",
      "new_mode": 33188,
      "new_path": "bgpd/bgpd.c"
    },
    {
      "type": "modify",
      "old_id": "63e326af9e5a07a3eceb6b8cc0e2b5b5205ec5c7",
      "old_mode": 33188,
      "old_path": "bgpd/bgpd.h",
      "new_id": "0746f0dd72fc8ed03d90e9095edd0a6caa6353fd",
      "new_mode": 33188,
      "new_path": "bgpd/bgpd.h"
    }
  ]
}
