From nobody@FreeBSD.org  Wed May 23 18:12:37 2012
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 99898106566C
	for <freebsd-gnats-submit@FreeBSD.org>; Wed, 23 May 2012 18:12:37 +0000 (UTC)
	(envelope-from nobody@FreeBSD.org)
Received: from red.freebsd.org (red.freebsd.org [IPv6:2001:4f8:fff6::22])
	by mx1.freebsd.org (Postfix) with ESMTP id 853AB8FC1A
	for <freebsd-gnats-submit@FreeBSD.org>; Wed, 23 May 2012 18:12:37 +0000 (UTC)
Received: from red.freebsd.org (localhost [127.0.0.1])
	by red.freebsd.org (8.14.4/8.14.4) with ESMTP id q4NICbgH021017
	for <freebsd-gnats-submit@FreeBSD.org>; Wed, 23 May 2012 18:12:37 GMT
	(envelope-from nobody@red.freebsd.org)
Received: (from nobody@localhost)
	by red.freebsd.org (8.14.4/8.14.4/Submit) id q4NICbFU021016;
	Wed, 23 May 2012 18:12:37 GMT
	(envelope-from nobody)
Message-Id: <201205231812.q4NICbFU021016@red.freebsd.org>
Date: Wed, 23 May 2012 18:12:37 GMT
From: Irakli M <ika256@gmail.com>
To: freebsd-gnats-submit@FreeBSD.org
Subject: if_re doesn't work if you set MAC address
X-Send-Pr-Version: www-3.1
X-GNATS-Notify:

>Number:         168268
>Category:       kern
>Synopsis:       [re] if_re doesn't work if you set MAC address
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    yongari
>State:          feedback
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Wed May 23 18:20:01 UTC 2012
>Closed-Date:    
>Last-Modified:  Thu May 24 02:20:26 UTC 2012
>Originator:     Irakli M
>Release:        9.0 Release
>Organization:
home
>Environment:
FreeBSD  9.0-RELEASE FreeBSD 9.0-RELEASE #0: Tue Jan  3 07:15:25 UTC 2012     root@obrian.cse.buffalo.edu:/usr/obj/usr/src/sys/GENERIC  i386

>Description:
if_re has a bug
If you set ether address in ifconfig, ping fails,
but after, if you change interface to promiscuous mode ping become work.



re0: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> metric 0 mtu 1500
        options=389b<RXCSUM,TXCSUM,VLAN_MTU,VLAN_HWTAGGING,VLAN_HWCSUM,WOL_UCAST,WOL_MCAST,WOL_MAGIC>


re0@pci0:2:0:0: class=0x020000 card=0x816810ec chip=0x816810ec rev=0x06 hdr=0x00
    vendor     = 'Realtek Semiconductor Co., Ltd.'
    device     = 'RTL8111/8168B PCI Express Gigabit Ethernet controller'
    class      = network
    subclass   = ethernet

>How-To-Repeat:
/etc/rc.conf

ifconfig_re0="inet 192.168.0.2/24"	 	ping works

ifconfig_re0="inet 192.168.0.2/24"
ifconfig_re0_alias0="ether 00:02:1a:2b:3c:4d"	ping fails

tcpdump -i re0 				ping works until Ctrl+C :)
>Fix:


>Release-Note:
>Audit-Trail:
Responsible-Changed-From-To: freebsd-bugs->freebsd-net 
Responsible-Changed-By: linimon 
Responsible-Changed-When: Wed May 23 21:58:05 UTC 2012 
Responsible-Changed-Why:  
Over to maintainer(s). 

http://www.freebsd.org/cgi/query-pr.cgi?pr=168268 
State-Changed-From-To: open->feedback 
State-Changed-By: yongari 
State-Changed-When: Thu May 24 02:19:19 UTC 2012 
State-Changed-Why:  
I think the correct way to change station address is to use 
/etc/start_if.<interface>. For this case, the filename would be 
/etc/start_if.re0 and its contents could be like the following. 

#!/bin/sh 
/sbin/ifconfig $1 ether 00:02:1a:2b:3c:4d 

See rc.conf(5) for more details. 


Responsible-Changed-From-To: freebsd-net->yongari 
Responsible-Changed-By: yongari 
Responsible-Changed-When: Thu May 24 02:19:19 UTC 2012 
Responsible-Changed-Why:  
Grab. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=168268 
>Unformatted:
