Fix CoI to APC mapping
authorJennifer Richards <jennifer@painless-security.com>
Fri, 20 Apr 2018 17:27:38 +0000 (13:27 -0400)
committerJennifer Richards <jennifer@painless-security.com>
Fri, 20 Apr 2018 17:28:15 +0000 (13:28 -0400)
commit4c86caeb37789f1cd95500899af4affead62070b
treef9dd3f6b7e3851b7ecdb42560789f978c708899f
parent05e667e14a4016f713b200f86f15704b5b8a34b6
Fix CoI to APC mapping

  * Route forwarded request based on mapped APC, not the original COI
  * Refactor COI/APC mapping code out of tr_tids_req_handler(), which
    remains in desperate need of refactoring for clarity
  * Use accessors instead of direct reference to structure elements in a
    few places (still more to convert)
  * Don't assume TR_NAME buf is null-terminated (it always is AFAIK, but
    is not required by the data structure). Still more of these to fix
  * Rename tid_req_set_rp_orig_coi() to _set_orig_coi(). It's not exported
    as part of the public API and was not used in our code. I think this
    was originally a copy/paste error.

This resolves https://bugs.launchpad.net/moonshot-tr/+bug/1765681
include/trust_router/tid.h
tid/tid_req.c
tr/tr_tid.c