diff options
author | Pavel Machek <pavel@ucw.cz> | 2000-05-10 15:42:46 +0200 |
---|---|---|
committer | Pavel Machek <pavel@ucw.cz> | 2000-05-10 15:42:46 +0200 |
commit | 45a48e2de21cbf1a48c6f478ed068e48f20f918b (patch) | |
tree | 9a7cd7a1a9fee56d1c5174600d6c63d7cd6f2c93 /nest | |
parent | a3f657ac764ff38a5829f27a0dccbf6220043a1a (diff) | |
download | bird-45a48e2de21cbf1a48c6f478ed068e48f20f918b.tar bird-45a48e2de21cbf1a48c6f478ed068e48f20f918b.zip |
password_same utility function
Diffstat (limited to 'nest')
-rw-r--r-- | nest/password.c | 8 | ||||
-rw-r--r-- | nest/password.h | 1 |
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); |