Copy wi_{dst,src}_addr from struct wi_frame into faked-up ether_header

instead of addr1 and addr2. THis means that tcpdump -e will show the
correct MAC address for communications with access points instead of showing
the BSSID.

In the future there should be 802.11 support for bpf/libpcap/tcpdump,
but that is aways down the road.

Also fix a typo in a comment.
This commit is contained in:
jhawk 2000-08-18 04:11:48 +00:00
parent 697db6345c
commit 8c3116e66a
1 changed files with 4 additions and 4 deletions

View File

@ -1,4 +1,4 @@
/* $NetBSD: if_wi.c,v 1.29 2000/07/31 03:25:11 enami Exp $ */
/* $NetBSD: if_wi.c,v 1.30 2000/08/18 04:11:48 jhawk Exp $ */
/*
* Copyright (c) 1997, 1998, 1999
@ -522,9 +522,9 @@ static void wi_rxeof(sc)
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));
@ -1661,7 +1661,7 @@ static void wi_start(ifp)
#if NBPFILTER > 0
/*
* If there's a BPF listner, bounce a copy of
* If there's a BPF listener, bounce a copy of
* this frame to him.
*/
if (ifp->if_bpf)