From nobody@FreeBSD.org  Wed Jul 22 13:40:13 2009
Return-Path: <nobody@FreeBSD.org>
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id D116C106564A
	for <freebsd-gnats-submit@FreeBSD.org>; 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 <freebsd-gnats-submit@FreeBSD.org>; 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 <freebsd-gnats-submit@FreeBSD.org>; 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 <Artis.Caune@gmail.com>
To: freebsd-gnats-submit@FreeBSD.org
Subject: [patch] ifconfig: print carp mac address
X-Send-Pr-Version: www-3.1
X-GNATS-Notify:

>Number:         136994
>Category:       bin
>Synopsis:       [patch] ifconfig(8) print carp mac address
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    hiren
>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:  Thu Aug 29 10:10:01 UTC 2013
>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<UP,LOOPBACK,RUNNING> 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:
Responsible-Changed-From-To: freebsd-bugs->freebsd-net 
Responsible-Changed-By: gavin 
Responsible-Changed-When: Wed Jul 22 18:45:25 UTC 2009 
Responsible-Changed-Why:  
Over to maintainer(s) 

http://www.freebsd.org/cgi/query-pr.cgi?pr=136994 

From: Dennis Yusupoff <dyr@smartspb.net>
To: bug-followup@FreeBSD.org, Artis.Caune@gmail.com
Cc:  
Subject: Re: bin/136994: [patch] ifconfig(8) print carp mac address
Date: Mon, 21 Dec 2009 15:45:40 +0300

 This is an OpenPGP/MIME signed message (RFC 2440 and 3156)
 --------------enigA4B9AA74B0E28FEA26407577
 Content-Type: text/plain; charset=UTF-8
 Content-Transfer-Encoding: quoted-printable
 
 
 It will be really nice to see this feature in production. Could you
 speed up its commiting?
 
 ---
 With best regards,
 Dennis Yusupoff,
 network engineer of
 Smart-Telecom ISP
 Russia, Saint-Petersburg
 
 
 --------------enigA4B9AA74B0E28FEA26407577
 Content-Type: application/pgp-signature; name="signature.asc"
 Content-Description: OpenPGP digital signature
 Content-Disposition: attachment; filename="signature.asc"
 
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1.4.10 (MingW32)
 Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/
 
 iQEcBAEBAgAGBQJLL234AAoJEBUTaqBS2NB4F6QIAIArXFiLhqqGCW20UvoSKUTo
 T5m/0GbrrRAstbQDV1un9P3NthlO4ydvMUeutUpr7PlpBkjU8OEN9zAl34kyDLFs
 cEvaBUBkigukfFKXFMmAzZC0ecetgPNekrSqkaMvca9q8vijazkBQNWG+oIYGYFq
 RkrRcEvKLWMk1f6fZlyzZfMx4EMudwAOXHObL5Z8reEabcVRBZYBA+aPpxXYUzXZ
 Qe3kgd+j/EGokEgq6cbSsbZwSydQ29nkJVMDA7zeUCVhIDXUo7XXaK69ePzqKmql
 Rkh9Q1vyPjxYRAaSb7r1jLsuOaMzteQ44kgPk3R6LMK7Bzo4T2kFV5ppOCUDhr0=
 =nBly
 -----END PGP SIGNATURE-----
 
 --------------enigA4B9AA74B0E28FEA26407577--

From: Alessandro Dellavedova <alessandro.dellavedova@ifom-ieo-campus.it>
To: bug-followup@FreeBSD.org,
 Artis.Caune@gmail.com
Cc:  
Subject: Re: bin/136994: [patch] ifconfig(8) print carp mac address
Date: Thu, 12 May 2011 15:22:13 +0200

 I second this, it would be really nice to see the virtual MAC address of =
 the CARP interfaces.
 
 Any chance to see it committed anytime soon ?
 
 Regards,
 
 Alessandro
 
 
 
 
 
 
Responsible-Changed-From-To: freebsd-net->hiren 
Responsible-Changed-By: hiren 
Responsible-Changed-When: Tue May 14 22:22:56 UTC 2013 
Responsible-Changed-Why:  
Grab. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=136994 

From: Marcelo Araujo <araujobsdport@gmail.com>
To: "bug-followup@FreeBSD.org" <bug-followup@freebsd.org>
Cc:  
Subject: bin/136994: [patch] ifconfig(8) print carp mac address
Date: Thu, 29 Aug 2013 18:00:04 +0800

 --047d7b5d9c6b8d5dba04e5132be7
 Content-Type: multipart/alternative; boundary=047d7b5d9c6b8d5db504e5132be5
 
 --047d7b5d9c6b8d5db504e5132be5
 Content-Type: text/plain; charset=ISO-8859-1
 
 Hello,
 
 Here is a patch that will make it works on current carp implementation.
 
 Best Regards,
 -- 
 Marcelo Araujo
 araujo@FreeBSD.org
 
 --047d7b5d9c6b8d5db504e5132be5
 Content-Type: text/html; charset=ISO-8859-1
 
 <div dir="ltr">Hello,<div><br></div><div>Here is a patch that will make it works on current carp implementation.</div><div><br clear="all"><div>Best Regards,</div>-- <br>Marcelo Araujo<br>araujo@FreeBSD.org
 </div></div>
 
 --047d7b5d9c6b8d5db504e5132be5--
 --047d7b5d9c6b8d5dba04e5132be7
 Content-Type: text/plain; charset=US-ASCII; name="carp-patch.txt"
 Content-Disposition: attachment; filename="carp-patch.txt"
 Content-Transfer-Encoding: base64
 X-Attachment-Id: f_hkxsx5860
 
 LS0tIGNhcnAuYwkyMDEzLTA3LTAyIDE5OjE3OjE0LjAwMDAwMDAwMCArMDgwMAorKysgL3RtcC9j
 YXJwLmMJMjAxMy0wOC0yOSAxNzo1NjoyMy4wMDAwMDAwMDAgKzA4MDAKQEAgLTcxLDYgKzcxLDcg
 QEAKIHsKIAlzdHJ1Y3QgY2FycHJlcSBjYXJwcltDQVJQX01BWFZISURdOwogCWludCBpOworCXN0
 YXRpYyBpbnQgY2FycG1hY1s1XSA9IHswLCAwLCAweDVlLCAwLCAxfTsKIAogCWJ6ZXJvKGNhcnBy
 LCBzaXplb2Yoc3RydWN0IGNhcnByZXEpICogQ0FSUF9NQVhWSElEKTsKIAljYXJwclswXS5jYXJw
 cl9jb3VudCA9IENBUlBfTUFYVkhJRDsKQEAgLTgzLDYgKzg0LDkgQEAKIAkJcHJpbnRmKCJcdGNh
 cnA6ICVzIHZoaWQgJWQgYWR2YmFzZSAlZCBhZHZza2V3ICVkIiwKIAkJICAgIGNhcnBfc3RhdGVz
 W2NhcnByW2ldLmNhcnByX3N0YXRlXSwgY2FycHJbaV0uY2FycHJfdmhpZCwKIAkJICAgIGNhcnBy
 W2ldLmNhcnByX2FkdmJhc2UsIGNhcnByW2ldLmNhcnByX2FkdnNrZXcpOworCQlwcmludGYoIiBl
 dGhlciAlMDJ4OiUwMng6JTAyeDolMDJ4OiUwMng6JTAyeCIsCisJCQljYXJwbWFjWzBdLCBjYXJw
 bWFjWzFdLCBjYXJwbWFjWzJdLCBjYXJwbWFjWzNdLCBjYXJwbWFjWzRdLAorCQkJY2FycHJbaV0u
 Y2FycHJfdmhpZCk7CiAJCWlmIChwcmludGtleXMgJiYgY2FycHJbaV0uY2FycHJfa2V5WzBdICE9
 ICdcMCcpCiAJCQlwcmludGYoIiBrZXkgXCIlc1wiXG4iLCBjYXJwcltpXS5jYXJwcl9rZXkpOwog
 CQllbHNlCg==
 --047d7b5d9c6b8d5dba04e5132be7--
>Unformatted:
