summaryrefslogtreecommitdiff
path: root/sbin/isakmpd/udp.c
diff options
context:
space:
mode:
authorAngelos D. Keromytis <angelos@cvs.openbsd.org>2001-08-12 15:48:45 +0000
committerAngelos D. Keromytis <angelos@cvs.openbsd.org>2001-08-12 15:48:45 +0000
commit0c8f2a59438f9d4e2373aceadcae7166465e275b (patch)
treebcf6f36e0f1d641701f0c8a2d4c0161dab3e4e73 /sbin/isakmpd/udp.c
parent78dea38ce2947781b217944364dc09224117c823 (diff)
Don't coredump if the kernel doesn't support IPv6.
Diffstat (limited to 'sbin/isakmpd/udp.c')
-rw-r--r--sbin/isakmpd/udp.c13
1 files changed, 10 insertions, 3 deletions
diff --git a/sbin/isakmpd/udp.c b/sbin/isakmpd/udp.c
index 39e48fb7b18..d88083bcb64 100644
--- a/sbin/isakmpd/udp.c
+++ b/sbin/isakmpd/udp.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: udp.c,v 1.46 2001/08/11 10:13:32 angelos Exp $ */
+/* $OpenBSD: udp.c,v 1.47 2001/08/12 15:48:44 angelos Exp $ */
/* $EOM: udp.c,v 1.57 2001/01/26 10:09:57 niklas Exp $ */
/*
@@ -609,7 +609,11 @@ udp_init (void)
default_transport = udp_bind ((struct sockaddr *)&dflt_stor);
if (!default_transport)
- log_error ("udp_init: could not allocate default IPv4 ISAKMP UDP port");
+ {
+ log_error ("udp_init: could not allocate default IPv4 ISAKMP UDP port");
+ return;
+ }
+
LIST_INSERT_HEAD (&udp_listen_list,
(struct udp_transport *)default_transport, link);
@@ -620,7 +624,10 @@ udp_init (void)
default_transport6 = udp_bind ((struct sockaddr *)&dflt_stor);
if (!default_transport6)
- log_error ("udp_init: could not allocate default IPv6 ISAKMP UDP port");
+ {
+ log_error ("udp_init: could not allocate default IPv6 ISAKMP UDP port");
+ return;
+ }
LIST_INSERT_HEAD (&udp_listen_list,
(struct udp_transport *)default_transport6, link);
}