summaryrefslogtreecommitdiff
path: root/usr.sbin
diff options
context:
space:
mode:
authorAlexander Bluhm <bluhm@cvs.openbsd.org>2010-06-03 10:00:35 +0000
committerAlexander Bluhm <bluhm@cvs.openbsd.org>2010-06-03 10:00:35 +0000
commite87d90c9790ab22a5561c1fa470491a810004ea2 (patch)
treeb9ca360654aaf2f9e4bc4241ef2de610a1489b5f /usr.sbin
parent9ac93a4051f761c8943788db26f0276a01830e7c (diff)
The is no md5 authentication in OSPFv3. Remove some leftovers from
the ospf6d packet lenght calculation. ok claudio@ stsp@
Diffstat (limited to 'usr.sbin')
-rw-r--r--usr.sbin/ospf6d/database.c7
-rw-r--r--usr.sbin/ospf6d/lsreq.c7
-rw-r--r--usr.sbin/ospf6d/lsupdate.c4
-rw-r--r--usr.sbin/ospf6d/ospf6d.h3
4 files changed, 9 insertions, 12 deletions
diff --git a/usr.sbin/ospf6d/database.c b/usr.sbin/ospf6d/database.c
index 5590cf91eb6..cab898e3188 100644
--- a/usr.sbin/ospf6d/database.c
+++ b/usr.sbin/ospf6d/database.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: database.c,v 1.10 2010/05/26 13:56:08 nicm Exp $ */
+/* $OpenBSD: database.c,v 1.11 2010/06/03 10:00:34 bluhm Exp $ */
/*
* Copyright (c) 2005 Claudio Jeker <claudio@openbsd.org>
@@ -89,10 +89,9 @@ send_db_description(struct nbr *nbr)
bits &= ~OSPF_DBD_I;
- /* build LSA list, keep space for a possible md5 sum */
+ /* build LSA list */
for (le = TAILQ_FIRST(&nbr->db_sum_list); le != NULL &&
- buf->wpos + sizeof(struct lsa_hdr) < buf->max -
- MD5_DIGEST_LENGTH; le = nle) {
+ buf->wpos + sizeof(struct lsa_hdr) < buf->max; le = nle) {
nbr->dd_end = nle = TAILQ_NEXT(le, entry);
if (ibuf_add(buf, le->le_lsa, sizeof(struct lsa_hdr)))
goto fail;
diff --git a/usr.sbin/ospf6d/lsreq.c b/usr.sbin/ospf6d/lsreq.c
index 97295dac9b9..f1bcea76727 100644
--- a/usr.sbin/ospf6d/lsreq.c
+++ b/usr.sbin/ospf6d/lsreq.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: lsreq.c,v 1.5 2010/05/26 13:56:08 nicm Exp $ */
+/* $OpenBSD: lsreq.c,v 1.6 2010/06/03 10:00:34 bluhm Exp $ */
/*
* Copyright (c) 2004, 2005, 2007 Esben Norby <norby@openbsd.org>
@@ -60,10 +60,9 @@ send_ls_req(struct nbr *nbr)
if (gen_ospf_hdr(buf, nbr->iface, PACKET_TYPE_LS_REQUEST))
goto fail;
- /* LSA header(s), keep space for a possible md5 sum */
+ /* LSA header(s) */
for (le = TAILQ_FIRST(&nbr->ls_req_list); le != NULL &&
- buf->wpos + sizeof(struct ls_req_hdr) < buf->max -
- MD5_DIGEST_LENGTH; le = nle) {
+ buf->wpos + sizeof(struct ls_req_hdr) < buf->max; le = nle) {
nbr->ls_req = nle = TAILQ_NEXT(le, entry);
ls_req_hdr.zero = 0;
ls_req_hdr.type = le->le_lsa->type;
diff --git a/usr.sbin/ospf6d/lsupdate.c b/usr.sbin/ospf6d/lsupdate.c
index 868ca99ed7f..16c198d9455 100644
--- a/usr.sbin/ospf6d/lsupdate.c
+++ b/usr.sbin/ospf6d/lsupdate.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: lsupdate.c,v 1.6 2010/06/01 14:39:52 bluhm Exp $ */
+/* $OpenBSD: lsupdate.c,v 1.7 2010/06/03 10:00:34 bluhm Exp $ */
/*
* Copyright (c) 2005 Claudio Jeker <claudio@openbsd.org>
@@ -176,7 +176,7 @@ add_ls_update(struct ibuf *buf, struct iface *iface, void *data, int len,
size_t pos;
u_int16_t age;
- if (buf->wpos + len >= buf->max - MD5_DIGEST_LENGTH)
+ if (buf->wpos + len >= buf->max)
return (0);
pos = buf->wpos;
diff --git a/usr.sbin/ospf6d/ospf6d.h b/usr.sbin/ospf6d/ospf6d.h
index 0859101ba2c..9cba1885eeb 100644
--- a/usr.sbin/ospf6d/ospf6d.h
+++ b/usr.sbin/ospf6d/ospf6d.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: ospf6d.h,v 1.19 2009/12/22 19:32:36 claudio Exp $ */
+/* $OpenBSD: ospf6d.h,v 1.20 2010/06/03 10:00:34 bluhm Exp $ */
/*
* Copyright (c) 2004, 2007 Esben Norby <norby@openbsd.org>
@@ -24,7 +24,6 @@
#include <sys/socket.h>
#include <sys/time.h>
#include <sys/tree.h>
-#include <md5.h>
#include <net/if.h>
#include <netinet/in.h>
#include <event.h>