summaryrefslogtreecommitdiff
path: root/usr.sbin
diff options
context:
space:
mode:
authorAlexander Bluhm <bluhm@cvs.openbsd.org>2010-06-01 14:39:53 +0000
committerAlexander Bluhm <bluhm@cvs.openbsd.org>2010-06-01 14:39:53 +0000
commit6b6c97ebfcc921d74e18daf919d008bbf7be3e08 (patch)
tree4622a8b725441bbc73898be8f6130ff4af11f92b /usr.sbin
parent0078cb893f7e753d27d7e5e68d44d1a5c00e6432 (diff)
With IPv6 OSPF a single LSA can get larger than the MTU. As a
workaround it is better to drop this LSA with a log entry instead of sending emtpy update packets in a burst. As link LSAs cannot be split, the propper solution might be IPv6 fragments. See also RFC5340 Section 4.4.3.8 and Appendix A.1. ok stsp@
Diffstat (limited to 'usr.sbin')
-rw-r--r--usr.sbin/ospf6d/lsupdate.c18
1 files changed, 15 insertions, 3 deletions
diff --git a/usr.sbin/ospf6d/lsupdate.c b/usr.sbin/ospf6d/lsupdate.c
index 558b684a2ea..868ca99ed7f 100644
--- a/usr.sbin/ospf6d/lsupdate.c
+++ b/usr.sbin/ospf6d/lsupdate.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: lsupdate.c,v 1.5 2010/05/26 13:56:08 nicm Exp $ */
+/* $OpenBSD: lsupdate.c,v 1.6 2010/06/01 14:39:52 bluhm Exp $ */
/*
* Copyright (c) 2005 Claudio Jeker <claudio@openbsd.org>
@@ -466,8 +466,20 @@ ls_retrans_timer(int fd, short event, void *bula)
d = MAX_AGE;
if (add_ls_update(buf, nbr->iface, le->le_ref->data,
- le->le_ref->len, d) == 0)
- break;
+ le->le_ref->len, d) == 0) {
+ if (nlsa)
+ break;
+ /*
+ * A single lsa is too big to fit into an update
+ * packet. In this case drop the lsa, otherwise
+ * we send empty update packets in an endless loop.
+ */
+ log_warnx("ls_retrans_timer: cannot send lsa, dropped");
+ log_debug("ls_retrans_timer: type: %04x len: %u",
+ ntohs(le->le_ref->hdr.type), le->le_ref->len);
+ ls_retrans_list_free(nbr, le);
+ continue;
+ }
nlsa++;
if (le->le_oneshot)
ls_retrans_list_free(nbr, le);