summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorclaudio <claudio@openbsd.org>2006-03-09 14:16:34 +0000
committerclaudio <claudio@openbsd.org>2006-03-09 14:16:34 +0000
commit0b593adcedca68f73b6c4a493de49b315e33fc44 (patch)
treefe5d13538c84c1344f223b5c98088ecd606cb9dc
parentRemove -n from synopsis too (diff)
downloadwireguard-openbsd-0b593adcedca68f73b6c4a493de49b315e33fc44.tar.xz
wireguard-openbsd-0b593adcedca68f73b6c4a493de49b315e33fc44.zip
Correctly warn about unsupported interface types as it is done in other places.
-rw-r--r--usr.sbin/ospfd/hello.c15
1 files changed, 8 insertions, 7 deletions
diff --git a/usr.sbin/ospfd/hello.c b/usr.sbin/ospfd/hello.c
index 7d8454eb38f..8bd805efc4c 100644
--- a/usr.sbin/ospfd/hello.c
+++ b/usr.sbin/ospfd/hello.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: hello.c,v 1.12 2006/02/02 20:46:34 claudio Exp $ */
+/* $OpenBSD: hello.c,v 1.13 2006/03/09 14:16:34 claudio Exp $ */
/*
* Copyright (c) 2005 Claudio Jeker <claudio@openbsd.org>
@@ -44,10 +44,6 @@ send_hello(struct iface *iface)
struct buf *buf;
int ret;
- /* XXX READ_BUF_SIZE */
- if ((buf = buf_dynamic(PKG_DEF_SIZE, READ_BUF_SIZE)) == NULL)
- fatal("send_hello");
-
dst.sin_family = AF_INET;
dst.sin_len = sizeof(struct sockaddr_in);
@@ -58,8 +54,9 @@ send_hello(struct iface *iface)
break;
case IF_TYPE_NBMA:
case IF_TYPE_POINTOMULTIPOINT:
- /* XXX not supported */
- break;
+ log_debug("send_hello: type %s not supported, interface %s",
+ if_type_name(iface->type), iface->name);
+ return (-1);
case IF_TYPE_VIRTUALLINK:
dst.sin_addr = iface->dst;
break;
@@ -67,6 +64,10 @@ send_hello(struct iface *iface)
fatalx("send_hello: unknown interface type");
}
+ /* XXX READ_BUF_SIZE */
+ if ((buf = buf_dynamic(PKG_DEF_SIZE, READ_BUF_SIZE)) == NULL)
+ fatal("send_hello");
+
/* OSPF header */
if (gen_ospf_hdr(buf, iface, PACKET_TYPE_HELLO))
goto fail;