From fenner@nectar.attlabs.att.com  Wed Aug 16 11:31:53 2000
Return-Path: <fenner@nectar.attlabs.att.com>
Received: from nectar.attlabs.att.com (gatemp.attlabs.net [135.197.1.2])
	by hub.freebsd.org (Postfix) with ESMTP id C46F237C0FA
	for <FreeBSD-gnats-submit@freebsd.org>; Wed, 16 Aug 2000 11:31:44 -0700 (PDT)
	(envelope-from fenner@nectar.attlabs.att.com)
Received: (from fenner@localhost)
	by nectar.attlabs.att.com (8.9.3/8.9.2) id OAA00636;
	Wed, 16 Aug 2000 14:31:08 -0700 (PDT)
	(envelope-from fenner)
Message-Id: <200008162131.OAA00636@nectar.attlabs.att.com>
Date: Wed, 16 Aug 2000 14:31:08 -0700 (PDT)
From: Bill Fenner <fenner@research.att.com>
Sender: fenner@nectar.attlabs.att.com
Reply-To: fenner@research.att.com
To: FreeBSD-gnats-submit@freebsd.org
Subject: if_wi provides 802.11 src and dst, not ethernet src and dst
X-Send-Pr-Version: 3.2

>Number:         20660
>Category:       i386
>Synopsis:       if_wi provides 802.11 src and dst, not ethernet src and dst
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    wpaul
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Wed Aug 16 11:40:00 PDT 2000
>Closed-Date:    Fri Jul 09 06:13:17 GMT 2004
>Last-Modified:  Fri Jul 09 06:13:17 GMT 2004
>Originator:     Bill Fenner
>Release:        FreeBSD 3.4-STABLE i386
>Organization:
AT&T Labs - Research
>Environment:

	

>Description:

	

if_wi.c supplies the 802.11 MAC source and destination addresses when
receiving a packet.  When in infrastructure mode, this may not be what
you're interested in (e.g. when I'm running tcpdump I'm more interested
in the original MAC source than which access point sent it to me).
When not in infrastructure mode, these addresses are the same.

>How-To-Repeat:

	
tcpdump -e -i wi0

>Fix:
	
	

Index: if_wi.c
===================================================================
RCS file: /home/ncvs/src/sys/i386/isa/if_wi.c,v
retrieving revision 1.5.2.4
diff -u -r1.5.2.4 if_wi.c
--- if_wi.c	1999/08/29 16:07:24	1.5.2.4
+++ if_wi.c	2000/08/16 18:18:59
@@ -426,9 +434,9 @@
 		m->m_pkthdr.len = m->m_len =
 		    rx_frame.wi_dat_len + WI_SNAPHDR_LEN;
 
-		bcopy((char *)&rx_frame.wi_addr1,
+		bcopy((char *)&rx_frame.wi_dst_addr,
 		    (char *)&eh->ether_dhost, ETHER_ADDR_LEN);
-		bcopy((char *)&rx_frame.wi_addr2,
+		bcopy((char *)&rx_frame.wi_src_addr,
 		    (char *)&eh->ether_shost, ETHER_ADDR_LEN);
 		bcopy((char *)&rx_frame.wi_type,
 		    (char *)&eh->ether_type, sizeof(u_int16_t));

>Release-Note:
>Audit-Trail:
Responsible-Changed-From-To: freebsd-bugs->wpaul 
Responsible-Changed-By: sheldonh 
Responsible-Changed-When: Wed Aug 16 12:20:12 PDT 2000 
Responsible-Changed-Why:  
Bill, this one contains a patch. :-) 

http://www.freebsd.org/cgi/query-pr.cgi?pr=20660 
State-Changed-From-To: open->closed 
State-Changed-By: bms 
State-Changed-When: Fri Jul 9 06:12:47 GMT 2004 
State-Changed-Why:  
802.11 is Very Different Now 

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