From owner-freebsd-bugs@FreeBSD.ORG Wed Jul 22 13:50:06 2009 Return-Path: Delivered-To: freebsd-bugs@hub.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 3C3891065670 for ; Wed, 22 Jul 2009 13:50:06 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:4f8:fff6::28]) by mx1.freebsd.org (Postfix) with ESMTP id F0FA68FC13 for ; Wed, 22 Jul 2009 13:50:05 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (gnats@localhost [127.0.0.1]) by freefall.freebsd.org (8.14.3/8.14.3) with ESMTP id n6MDo5VQ053528 for ; Wed, 22 Jul 2009 13:50:05 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.3/8.14.3/Submit) id n6MDo560053527; Wed, 22 Jul 2009 13:50:05 GMT (envelope-from gnats) Resent-Date: Wed, 22 Jul 2009 13:50:05 GMT Resent-Message-Id: <200907221350.n6MDo560053527@freefall.freebsd.org> Resent-From: FreeBSD-gnats-submit@FreeBSD.org (GNATS Filer) Resent-To: freebsd-bugs@FreeBSD.org Resent-Reply-To: FreeBSD-gnats-submit@FreeBSD.org, Artis Caune Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id D116C106564A for ; Wed, 22 Jul 2009 13:40:13 +0000 (UTC) (envelope-from nobody@FreeBSD.org) Received: from www.freebsd.org (www.freebsd.org [IPv6:2001:4f8:fff6::21]) by mx1.freebsd.org (Postfix) with ESMTP id BF5A88FC0C for ; Wed, 22 Jul 2009 13:40:13 +0000 (UTC) (envelope-from nobody@FreeBSD.org) Received: from www.freebsd.org (localhost [127.0.0.1]) by www.freebsd.org (8.14.3/8.14.3) with ESMTP id n6MDeDpY090489 for ; Wed, 22 Jul 2009 13:40:13 GMT (envelope-from nobody@www.freebsd.org) Received: (from nobody@localhost) by www.freebsd.org (8.14.3/8.14.3/Submit) id n6MDeDbN090473; Wed, 22 Jul 2009 13:40:13 GMT (envelope-from nobody) Message-Id: <200907221340.n6MDeDbN090473@www.freebsd.org> Date: Wed, 22 Jul 2009 13:40:13 GMT From: Artis Caune To: freebsd-gnats-submit@FreeBSD.org X-Send-Pr-Version: www-3.1 Cc: Subject: bin/136994: [patch] ifconfig: print carp mac address X-BeenThere: freebsd-bugs@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 22 Jul 2009 13:50:06 -0000 >Number: 136994 >Category: bin >Synopsis: [patch] ifconfig: print carp mac address >Confidential: no >Severity: non-critical >Priority: low >Responsible: freebsd-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: sw-bug >Submitter-Id: current-users >Arrival-Date: Wed Jul 22 13:50:05 UTC 2009 >Closed-Date: >Last-Modified: >Originator: Artis Caune >Release: current >Organization: >Environment: FreeBSD 8.0-BETA2 #0 r195800: Tue Jul 21 15:01:41 EEST 2009 root@builder:/usr/obj/usr/src/sys/FREEBSD >Description: It would be nice to see mac address of carp interfaces in ifconfig output. carp0: flags=49 metric 0 mtu 1500 ether 00:00:5e:00:01:fa carp: MASTER vhid 250 advbase 1 advskew 100 >How-To-Repeat: >Fix: Patch attached with submission follows: Index: sbin/ifconfig/af_link.c =================================================================== --- sbin/ifconfig/af_link.c (revision 195818) +++ sbin/ifconfig/af_link.c (working copy) @@ -57,6 +57,10 @@ /* XXX no const 'cuz LLADDR is defined wrong */ struct sockaddr_dl *sdl = (struct sockaddr_dl *) ifa->ifa_addr; + if (sdl != NULL && sdl->sdl_type == IFT_CARP) + printf("\tether %s\n", + ether_ntoa((struct ether_addr *)LLADDR(sdl))); + if (sdl != NULL && sdl->sdl_alen > 0) { if (sdl->sdl_type == IFT_ETHER && sdl->sdl_alen == ETHER_ADDR_LEN) >Release-Note: >Audit-Trail: >Unformatted: