bin/136994: [patch] ifconfig: print carp mac address
Artis Caune
Artis.Caune at gmail.com
Wed Jul 22 13:50:06 UTC 2009
>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 at 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:
>Unformatted:
More information about the freebsd-bugs
mailing list