summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPavel Machek <pavel@ucw.cz>2000-05-10 15:42:46 +0200
committerPavel Machek <pavel@ucw.cz>2000-05-10 15:42:46 +0200
commit45a48e2de21cbf1a48c6f478ed068e48f20f918b (patch)
tree9a7cd7a1a9fee56d1c5174600d6c63d7cd6f2c93
parenta3f657ac764ff38a5829f27a0dccbf6220043a1a (diff)
downloadbird-45a48e2de21cbf1a48c6f478ed068e48f20f918b.tar
bird-45a48e2de21cbf1a48c6f478ed068e48f20f918b.zip
password_same utility function
-rw-r--r--nest/password.c8
-rw-r--r--nest/password.h1
2 files changed, 9 insertions, 0 deletions
diff --git a/nest/password.c b/nest/password.c
index 6a02028..b8acb53 100644
--- a/nest/password.c
+++ b/nest/password.c
@@ -51,3 +51,11 @@ password_strncpy(char *to, char *from, int len)
}
}
+int
+password_same(struct password_item *old, struct password_item *new)
+{
+ return ((old->from == new->from) &&
+ (old->to == new->to) &&
+ (old->passive == new->passive) &&
+ password_same(old, new));
+}
diff --git a/nest/password.h b/nest/password.h
index 119aa70..481eeb6 100644
--- a/nest/password.h
+++ b/nest/password.h
@@ -20,6 +20,7 @@ struct password_item {
extern struct password_item *last_password_item;
struct password_item *get_best_password(struct password_item *head, int flags);
+extern int password_same(struct password_item *, struct password_item *);
extern void password_strncpy(char *to, char *from, int len);