NetBSD Problem Report #54513
From root@pip.kardel.name Fri Aug 30 19:16:33 2019
Return-Path: <root@pip.kardel.name>
Received: from mail.netbsd.org (mail.netbsd.org [199.233.217.200])
(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
(Client CN "mail.NetBSD.org", Issuer "mail.NetBSD.org CA" (not verified))
by mollari.NetBSD.org (Postfix) with ESMTPS id DE4CD7A184
for <gnats-bugs@gnats.NetBSD.org>; Fri, 30 Aug 2019 19:16:33 +0000 (UTC)
Message-Id: <20190830191627.71718DA0D90@pip.kardel.name>
Date: Fri, 30 Aug 2019 21:16:27 +0200 (CEST)
From: kardel@netbsd.org
Reply-To: kardel@netbsd.org
To: gnats-bugs@NetBSD.org
Subject: ifconfig exits on newly created carp interfaces
X-Send-Pr-Version: 3.95
>Number: 54513
>Category: bin
>Synopsis: ifconfig exits on newly created carp interfaces
>Confidential: no
>Severity: serious
>Priority: medium
>Responsible: bin-bug-people
>State: closed
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Fri Aug 30 19:20:00 +0000 2019
>Closed-Date: Tue Oct 01 10:58:35 +0000 2019
>Last-Modified: Tue Oct 01 10:58:35 +0000 2019
>Originator: Frank Kardel
>Release: NetBSD 9.99.6
>Organization:
>Environment:
System: NetBSD pip 9.99.6 NetBSD 9.99.6 (PIPGEN) #20: Sat Aug 10 12:14:12 CEST 2019 kardel@pip:.../src/obj.amd64/sys/arch/amd64/compile/PIPGEN amd64
Architecture: x86_64
Machine: amd64
>Description:
Create a carp interface instance and see ifconfig exit with following error:
# ifconfig
...
carp0: flags=0x8802<BROADCAST,SIMPLEX,MULTICAST> mtu 1500
ifconfig: print_link_addresses: ioctl: Can't assign requested address
[ exit 1 here ]
This also appears in 9.0_BETA.
Things are fine once the carp device is fully initialized.
ifconfig shouldn't exit on newly created carp devices.
>How-To-Repeat:
# ifconfig carp0 create
# ifconfig carp1 create
# ifconfig
See that carp1 is never listed. It will be listed when
you ifconfig carp0 destroy.
>Fix:
Don't exit in the print_link_addresses function on a failed ioctl(2).
>Release-Note:
>Audit-Trail:
From: "Frank Kardel" <kardel@netbsd.org>
To: gnats-bugs@gnats.NetBSD.org
Cc:
Subject: PR/54513 CVS commit: src/sbin/ifconfig
Date: Tue, 1 Oct 2019 10:52:53 +0000
Module Name: src
Committed By: kardel
Date: Tue Oct 1 10:52:53 UTC 2019
Modified Files:
src/sbin/ifconfig: util.c
Log Message:
PR/54513 ifconfig exits on newly created carp interfaces
downgrade from err(EXIT_FAILURE, ... ) to warn() if ioctl(SIOCGLIFADDR) fails.
ifconfig now survives freshly created carp interfaces.
To generate a diff of this commit:
cvs rdiff -u -r1.18 -r1.19 src/sbin/ifconfig/util.c
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
State-Changed-From-To: open->closed
State-Changed-By: kardel@NetBSD.org
State-Changed-When: Tue, 01 Oct 2019 10:58:35 +0000
State-Changed-Why:
fix committed
>Unformatted:
(Contact us)
$NetBSD: query-full-pr,v 1.43 2018/01/16 07:36:43 maya Exp $
$NetBSD: gnats_config.sh,v 1.9 2014/08/02 14:16:04 spz Exp $
Copyright © 1994-2017
The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.