summaryrefslogtreecommitdiff
path: root/sbin/isakmpd/udp.c
diff options
context:
space:
mode:
authorMarkus Friedl <markus@cvs.openbsd.org>2005-08-25 09:57:59 +0000
committerMarkus Friedl <markus@cvs.openbsd.org>2005-08-25 09:57:59 +0000
commitdee1002aa4f1558a4a373977e0f607d3b422eab5 (patch)
tree08accd4bc976f9be69257293efc867494ff98be3 /sbin/isakmpd/udp.c
parent54df74189470ec4b6d0460f10ec2ef6b827b1ec8 (diff)
read the information from the INADDR_ANY socket and do not loop if
a new IP appears (cf udp.c, rev 1.74), ok ho@ hshoexer@ cloder@ deraadt@
Diffstat (limited to 'sbin/isakmpd/udp.c')
-rw-r--r--sbin/isakmpd/udp.c15
1 files changed, 14 insertions, 1 deletions
diff --git a/sbin/isakmpd/udp.c b/sbin/isakmpd/udp.c
index 10aa6a3f40f..9fa07c8aa16 100644
--- a/sbin/isakmpd/udp.c
+++ b/sbin/isakmpd/udp.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: udp.c,v 1.90 2005/06/04 21:54:55 hshoexer Exp $ */
+/* $OpenBSD: udp.c,v 1.91 2005/08/25 09:57:58 markus Exp $ */
/* $EOM: udp.c,v 1.57 2001/01/26 10:09:57 niklas Exp $ */
/*
@@ -419,6 +419,19 @@ udp_handle_message(struct transport *t)
UDP_SIZE, 0, &from, &len);
return;
}
+
+ if (t->virtual == (struct transport *)virtual_get_default(AF_INET) ||
+ t->virtual == (struct transport *)virtual_get_default(AF_INET6)) {
+ t->virtual->vtbl->reinit();
+
+ /*
+ * As we don't know the actual destination address of the
+ * packet, we can't really deal with it. So, just ignore it
+ * and hope we catch the retransmission.
+ */
+ return;
+ }
+
/*
* Make a specialized UDP transport structure out of the incoming
* transport and the address information we got from recvfrom(2).