diff options
author | Claudio Jeker <claudio@cvs.openbsd.org> | 2006-03-15 13:25:34 +0000 |
---|---|---|
committer | Claudio Jeker <claudio@cvs.openbsd.org> | 2006-03-15 13:25:34 +0000 |
commit | 2240960e106608b646894a6a2db7b283efd294e0 (patch) | |
tree | dcd2454860b02e4176fbfaf1a7c7775620392e62 /usr.sbin/ospfd/ospfd.h | |
parent | 93c106793532bebcc71168a48591f2c656ce45cc (diff) |
Looks like auth-type simple was busted since a long time. We bcmp() a
c string with a lenght <= 8 with a buffer of size 8. Now in some cases
there can be trailing garbage after the c-string and so the bcmp() fails.
Found by Sergey Matveychuk who provided a similar patch.
OK norby@
Diffstat (limited to 'usr.sbin/ospfd/ospfd.h')
-rw-r--r-- | usr.sbin/ospfd/ospfd.h | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/usr.sbin/ospfd/ospfd.h b/usr.sbin/ospfd/ospfd.h index db291510a9c..6b66a3c4937 100644 --- a/usr.sbin/ospfd/ospfd.h +++ b/usr.sbin/ospfd/ospfd.h @@ -1,4 +1,4 @@ -/* $OpenBSD: ospfd.h,v 1.51 2006/03/09 18:11:34 norby Exp $ */ +/* $OpenBSD: ospfd.h,v 1.52 2006/03/15 13:25:33 claudio Exp $ */ /* * Copyright (c) 2004 Esben Norby <norby@openbsd.org> @@ -29,6 +29,8 @@ #include <netinet/in.h> #include <event.h> +#include "ospf.h" + #define CONF_FILE "/etc/ospfd.conf" #define OSPFD_SOCKET "/var/run/ospfd.sock" #define OSPFD_USER "_ospfd" @@ -325,11 +327,11 @@ struct iface { struct lsa_head ls_ack_list; char name[IF_NAMESIZE]; + char auth_key[MAX_SIMPLE_AUTH_LEN]; struct in_addr addr; struct in_addr dst; struct in_addr mask; struct in_addr abr_id; - char *auth_key; struct nbr *dr; /* designated router */ struct nbr *bdr; /* backup designated router */ struct nbr *self; |