From 3ef0e99eef6d7d6d9c0aa6ecad7bb8404acb1cf1 Mon Sep 17 00:00:00 2001 From: Claudio Jeker Date: Thu, 9 Mar 2006 14:16:35 +0000 Subject: Correctly warn about unsupported interface types as it is done in other places. --- usr.sbin/ospfd/hello.c | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) (limited to 'usr.sbin') 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 @@ -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; -- cgit v1.2.3