summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorClaudio Jeker <claudio@cvs.openbsd.org>2007-02-01 12:41:04 +0000
committerClaudio Jeker <claudio@cvs.openbsd.org>2007-02-01 12:41:04 +0000
commita9bd4da40a75e3c21db269249271e57eb8736276 (patch)
tree42c695e6a973d129fef186763f5d7be7b1754595
parent1620e443a06a157a55c4029f91277121bd1a3960 (diff)
Implement md_list_send() function to send auth crypt keys to the OSPF engine.
Needed for reload support. OK norby@ pyr@
-rw-r--r--usr.sbin/ospfd/auth.c15
-rw-r--r--usr.sbin/ospfd/ospfe.h3
2 files changed, 16 insertions, 2 deletions
diff --git a/usr.sbin/ospfd/auth.c b/usr.sbin/ospfd/auth.c
index 02f70a54783..29f78024697 100644
--- a/usr.sbin/ospfd/auth.c
+++ b/usr.sbin/ospfd/auth.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: auth.c,v 1.10 2006/04/24 20:18:03 claudio Exp $ */
+/* $OpenBSD: auth.c,v 1.11 2007/02/01 12:41:03 claudio Exp $ */
/*
* Copyright (c) 2004, 2005 Esben Norby <norby@openbsd.org>
@@ -257,3 +257,16 @@ md_list_find(struct auth_md_head *head, u_int8_t keyid)
return (NULL);
}
+
+int
+md_list_send(struct auth_md_head *head, struct imsgbuf *to)
+{
+ struct auth_md *m;
+
+ TAILQ_FOREACH(m, head, entry)
+ if (imsg_compose(to, IMSG_RECONF_AUTHMD, 0, 0, m,
+ sizeof(*m)) == -1)
+ return (-1);
+
+ return (0);
+}
diff --git a/usr.sbin/ospfd/ospfe.h b/usr.sbin/ospfd/ospfe.h
index 822b887b914..6ce64455d04 100644
--- a/usr.sbin/ospfd/ospfe.h
+++ b/usr.sbin/ospfd/ospfe.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: ospfe.h,v 1.33 2006/11/17 08:55:31 claudio Exp $ */
+/* $OpenBSD: ospfe.h,v 1.34 2007/02/01 12:41:03 claudio Exp $ */
/*
* Copyright (c) 2004, 2005 Esben Norby <norby@openbsd.org>
@@ -100,6 +100,7 @@ int auth_gen(struct buf *, struct iface *);
void md_list_add(struct auth_md_head *, u_int8_t, char *);
void md_list_copy(struct auth_md_head *, struct auth_md_head *);
void md_list_clr(struct auth_md_head *);
+int md_list_send(struct auth_md_head *, struct imsgbuf *);
/* database.c */
int send_db_description(struct nbr *);