Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 13 Jan 2011 09:25:17 +0100
From:      Monthadar Al Jaberi <monthadar@gmail.com>
To:        Adrian Chadd <adrian@freebsd.org>
Cc:        freebsd-net@freebsd.org, freebsd-mips@freebsd.org, "Jayachandran C." <c.jayachandran@gmail.com>
Subject:   Re: capturing packet from wlan0 with netgraph?
Message-ID:  <AANLkTik4HtAX7MtT4dVbHku-bfVLun_C%2BnRsbL13SrHu@mail.gmail.com>
In-Reply-To: <AANLkTi=Wu=sgH76vHx-4CmaUgm_H9FMA9Nuvbgk4Gkzz@mail.gmail.com>
References:  <AANLkTi=s45woPE21exHgArAyAaO2sW%2BeR=%2BumB6zZcr5@mail.gmail.com> <AANLkTikC1nYudfM91rPxFfgCj83m8YbdagedeydyBaue@mail.gmail.com> <AANLkTikgdf4Uy20NF6vQ=-NWGYS4LDdmypKng=2Bg2ME@mail.gmail.com> <AANLkTi=Wu=sgH76vHx-4CmaUgm_H9FMA9Nuvbgk4Gkzz@mail.gmail.com>

next in thread | previous in thread | raw e-mail | index | archive | help
sorry but I have not worked with this for a while now, After some
thoughts I dont think using netgraph will do me any good, because
traffic can still flow through the antennas of the cards.

If you think it would still be useful to see more ddb prompt for other
scenarios I am happy to try and supply that, but I won't have some
free time until late tomorrow :)

thnx again!

On Thu, Jan 13, 2011 at 7:53 AM, Adrian Chadd <adrian@freebsd.org> wrote:
> I've encountered this before.
>
> The mbuf's there aren't always aligned at this point.
>
>
>
> Adrian
>
> On 13 January 2011 14:17, Jayachandran C. <c.jayachandran@gmail.com> wrot=
e:
>> On Thu, Jan 13, 2011 at 11:08 AM, Adrian Chadd <adrian@freebsd.org> wrot=
e:
>>> Find out what the address is that's causing the problem. There's
>>> plenty of places where unaligned mbuf's exist in the IP code and
>>> aren't correctly realigned before being touched.
>>>
>>> MIPS people - is "address error" an alignment problem?
>>
>> Address error can be an alignment problem (or some other cases like
>> accessing kernel address from userspace).
>>
>> But looking at the crash, it certainly seems like in ip_input, the line
>> =A0 =A0 435 =A0 =A0 =A0 =A0 if (ip->ip_v !=3D IPVERSION) {
>>
>> got a bad address for the ip pointer.
>>
>> The output of 'show registers' at the ddb prompt would be useful to
>> debug further.
>>
>>
>>> On 30 December 2010 21:47, Monthadar Al Jaberi <monthadar@gmail.com> wr=
ote:
>>>> Hi,
>>>>
>>>> I have an idea in my head and would like to know if it is possible.
>>>>
>>>> I want to simulate and test the net80211 mesh code in FreeBSD Current.
>>>> I have an RSPRO board with 3 atheros cards.
>>>>
>>>> My =A0basic idea is to run three jails each having its own network
>>>> stack, and redirect all data packets coming out/in of the wlan driver
>>>> to a Server running a home brew application that simulates the medium.
>>>> That would be great, right? Realtime unchanged code to test, running
>>>> different application in their own jails.
>>>>
>>>> So first I started to test netgraph with a simple test case, I want to
>>>> receive all packets from one wireless card and see the data in
>>>> wireshark or tcpdump...
>>>>
>>>> This is my netgraph code:
>>>> mkpeer wlan0: hub lower hook0
>>>> name wlan0:lower hub
>>>> connect hub: wlan0: hook1 upper
>>>> connect hub: arge0: hook2 lower
>>>>
>>>>
>>>> So if I understood man ng_ether correct, this should capture
>>>> everything from wlan and redirect to ethernet cable.
>>>>
>>>> But I get a panic after a couple of seconds:
>>>> Trap cause =3D 4 (address error (load or I-fetch) - kernel mode)
>>>> [ thread pid 11 tid 100037 ]
>>>> Stopped at =A0 =A0 =A0ip_input+0xd8: =A0lw =A0 =A0 =A0v0,0(s0)
>>>>
>>>> I suspect that data flows to all hooks of the hub, and that is a bad
>>>> thing right? Need to create a special hub node to filter data? Or
>>>> maybe use two ethernet cables for out resp. in?
>>>>
>>>> Is it even possible to do what I want? Or am I thinking wrong? And is
>>>> there a simpler way?
>>>>
>>>> What I want is to test mesh code in a bunch of FreeBSD systems without
>>>> moving the hardware, one could just stack RSPROs and connected them a
>>>> big switch and a PC.
>>>> Hope was I clear in my thoughts.
>>>>
>>>> Best regards,
>>>> --
>>>> //Monthadar Al Jaberi
>>
>> JC.
>>
>



--=20
//Monthadar Al Jaberi



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?AANLkTik4HtAX7MtT4dVbHku-bfVLun_C%2BnRsbL13SrHu>