summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorClaudio Jeker <claudio@cvs.openbsd.org>2006-03-09 14:16:35 +0000
committerClaudio Jeker <claudio@cvs.openbsd.org>2006-03-09 14:16:35 +0000
commit3ef0e99eef6d7d6d9c0aa6ecad7bb8404acb1cf1 (patch)
tree2be2f132f0e7259f9e453901a9a0ca4e15c1e77d
parent7b11aba9725ab7af486844d7e7f6826d2a0ec4d2 (diff)
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;