diff options
author | Eiichiro Watanabe <a16tochjp@gmail.com> | 2017-08-28 14:58:27 +0900 |
---|---|---|
committer | Eiichiro Watanabe <a16tochjp@gmail.com> | 2017-08-28 14:58:27 +0900 |
commit | 2d65055028a1eb3528ff6f3f5aaa486083d7e38e (patch) | |
tree | 52aa806ddf57ee569cae301909945aeab76fd701 | |
parent | 11b0b586805b42d4179255e78383c9795bd8c198 (diff) |
server: export addROA()/delROA() for library usage
-rw-r--r-- | server/rpki.go | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/server/rpki.go b/server/rpki.go index dab3d442..8bc6462e 100644 --- a/server/rpki.go +++ b/server/rpki.go @@ -303,6 +303,10 @@ func (m *roaManager) deleteROA(roa *table.ROA) { }).Info("Can't withdraw a ROA") } +func (m *roaManager) DeleteROA(roa *table.ROA) { + m.deleteROA(roa) +} + func (m *roaManager) addROA(roa *table.ROA) { tree, key := m.roa2tree(roa) b, _ := tree.Get(key) @@ -325,6 +329,10 @@ func (m *roaManager) addROA(roa *table.ROA) { bucket.entries = append(bucket.entries, roa) } +func (m *roaManager) AddROA(roa *table.ROA) { + m.addROA(roa) +} + func (c *roaManager) handleRTRMsg(client *roaClient, state *config.RpkiServerState, buf []byte) { received := &state.RpkiMessages.RpkiReceived |