summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorEiichiro Watanabe <a16tochjp@gmail.com>2017-08-28 14:58:27 +0900
committerEiichiro Watanabe <a16tochjp@gmail.com>2017-08-28 14:58:27 +0900
commit2d65055028a1eb3528ff6f3f5aaa486083d7e38e (patch)
tree52aa806ddf57ee569cae301909945aeab76fd701
parent11b0b586805b42d4179255e78383c9795bd8c198 (diff)
server: export addROA()/delROA() for library usage
-rw-r--r--server/rpki.go8
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