On 2007/03/17 15:08, Jon Morby wrote:
> > Checking tcpdump it seems that the password is being passed but
> > truncated as 7 characters plus a null character instead of the full
> > 8 character password
try this ..
Index: ospf.h
===================================================================
RCS file: /cvs/src/usr.sbin/ospfd/ospf.h,v
retrieving revision 1.16
diff -u -p -r1.16 ospf.h
--- ospf.h 7 Dec 2006 19:14:27 -0000 1.16
+++ ospf.h 17 Mar 2007 16:13:14 -0000
@@ -125,7 +125,7 @@ struct ospf_hdr {
u_int16_t chksum;
u_int16_t auth_type;
union {
- char simple[MAX_SIMPLE_AUTH_LEN];
+ char simple[MAX_SIMPLE_AUTH_LEN+1];
struct crypt crypt;
} auth_key;
};
Index: ospfd.c
===================================================================
RCS file: /cvs/src/usr.sbin/ospfd/ospfd.c,v
retrieving revision 1.42
diff -u -p -r1.42 ospfd.c
--- ospfd.c 16 Mar 2007 10:56:31 -0000 1.42
+++ ospfd.c 17 Mar 2007 16:13:14 -0000
@@ -765,7 +765,7 @@ merge_interfaces(struct area *a, struct
i->linkstate = xi->linkstate; /* needed? */
i->auth_type = xi->auth_type;
- strlcpy(i->auth_key, xi->auth_key, MAX_SIMPLE_AUTH_LEN);
+ strlcpy(i->auth_key, xi->auth_key, MAX_SIMPLE_AUTH_LEN+1);
md_list_clr(&i->auth_md_list);
md_list_copy(&i->auth_md_list, &xi->auth_md_list);
Index: ospfd.h
===================================================================
RCS file: /cvs/src/usr.sbin/ospfd/ospfd.h,v
retrieving revision 1.65
diff -u -p -r1.65 ospfd.h
--- ospfd.h 1 Feb 2007 13:02:04 -0000 1.65
+++ ospfd.h 17 Mar 2007 16:13:14 -0000
@@ -327,7 +327,7 @@ struct iface {
struct lsa_head ls_ack_list;
char name[IF_NAMESIZE];
- char auth_key[MAX_SIMPLE_AUTH_LEN];
+ char auth_key[MAX_SIMPLE_AUTH_LEN+1];
struct in_addr addr;
struct in_addr dst;
struct in_addr mask;
Index: parse.y
===================================================================
RCS file: /cvs/src/usr.sbin/ospfd/parse.y,v
retrieving revision 1.44
diff -u -p -r1.44 parse.y
--- parse.y 16 Mar 2007 10:54:43 -0000 1.44
+++ parse.y 17 Mar 2007 16:13:14 -0000
@@ -64,7 +64,7 @@ u_int32_t get_rtr_id(void);
int host(const char *, struct in_addr *, struct in_addr *);
struct config_defaults {
- char auth_key[MAX_SIMPLE_AUTH_LEN];
+ char auth_key[MAX_SIMPLE_AUTH_LEN+1];
struct auth_md_head md_list;
u_int32_t dead_interval;
u_int16_t transmit_delay;