From 2d65055028a1eb3528ff6f3f5aaa486083d7e38e Mon Sep 17 00:00:00 2001 From: Eiichiro Watanabe Date: Mon, 28 Aug 2017 14:58:27 +0900 Subject: server: export addROA()/delROA() for library usage --- server/rpki.go | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'server/rpki.go') 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 -- cgit v1.2.3