2006年12月27日 星期三

chillispot installion

為了Support FON今天試著把chillispot裝到ECS040的平台上,記錄一下裝的過程.

1.Download fonear.tar.gz
2.解開並patch
3.修改configure:20961

else
if test "$cross_compiling" = yes; then
ac_cv_func_malloc_0_nonnull=yes <---------------------------------原來是no改成yes
else

4.CFLAGS="-O2 -G 0 -mips32" LDFLAGS="-lcrypt" ./configure --host=mipsel-linux --target=mipsel-linux --cache-file=/dev/null
5.make
6.在來就將src/chilli擺到target上跑跑看.對了,還需要對應FON hotspot的config file
##############################################################################
#
# Fon ChilliSpot configuration file
# Powered by FON (www.fon.com)
#
##############################################################################
radiusserver1 radius01.fon.com
radiusserver2 radius02.fon.com
radiussecret garrafon
uamserver https://login.fon.com/cp/index.php
uamsecret garrafon
uamallowed www.fon.com,www.paypal.com,www.paypalobjects.com,www.skype.com
uamanydns

7.執行囉.注意要停止原本ath0上的dhcp server
./chilli -c ./chilli.conf --dns1=168.95.1.1 --dhcpif=ath0

8.有個地方有bug.在wireless client連線上由dhcp取得IP後送出的封包會轉送到eth0,這會造成skb_buf的錯誤,然後就panic

/fsdata # skput:under: 8010d2e0:54 put:14 dev:eth0Break instruction in kernel code in traps.c::do_bp, line 689:
$0 : 00000000 10008400 00000028 00000000 801bf900 00000001 00000001 00000001
$8 : 00000001 ffffd95e 0000195e 00000000 fffffffa ffffffff 0000000a 00000001
$16: 811b51a0 82c0f920 803aa0a2 810e6e24 00019923 801b3aa8 801b3a80 82a4de60
$24: 82a4dc89 803b4967 82a4c000 82a4dd70 00000005 800df800
Hi : 00000188
Lo : 002b0cdd
epc : 800df800 Tainted: P
Status: 10008403
Cause : 10800024
PrId : 0001800b
Process chilli (pid: 740, stackpage=82a4c000)
Stack: 00019923 8010d2e0 00000036 0000000e 801cb784 82a4dd90 8010d2f0
80000000 803d7780 82a4ddb8 811b51a0 811b51a0 00000008 810e6e24 801cb784
811b51a0 80107a94 80107d28 80154e54 80154fa4 00000036 801c0cb4 00000000
80107fa0 80000000 82a4de00 82a4de68 00000000 00000000 811b51a0 00000008
00000040 800e5558 800dfe18 811b51a0 8368c2e0 00000000 00000000 810e6e24
00000000 ...
Call Trace: [<8010d2e0>] [<8010d2f0>] [<80107a94>] [<80107d28>] [<80154e54>]
[<80154fa4>] [<80107fa0>] [<800e5558>] [<800dfe18>] [<800e5778>] [<800e593c>]
[<8001b20c>] [<800df938>] [<800e5174>] [<800516c0>] [<800c9190>] [<800c9158>]
[<800c921c>] [<8003ddf4>] [<800dd198>] [<8000ba60>]

Code: 248446c8 0c0057bc afa30010 <0000800d> 8fbf0018 03e00008 27bd0020 3c02803c 8c4289e4
Kernel panic: Aiee, killing interrupt handler!
In interrupt handler - not syncing


Trace一下吧

net/core/skbuff.c

void skb_under_panic(struct sk_buff *skb, int sz, void *here)
{
printk("skput:under: %p:%d put:%d dev:%s",
here, skb->len, sz, skb->dev ? skb->dev->name : " ");
BUG(); <-------------------------------------------就在這裡死啦
}

include/linux/skbuff.h

/**
* skb_push - add data to the start of a buffer
* @skb: buffer to use
* @len: amount of data to add
*
* This function extends the used data area of the buffer at the buffer
* start. If this would exceed the total buffer headroom the kernel will
* panic. A pointer to the first byte of the extra data is returned.
*/

static inline unsigned char *skb_push(struct sk_buff *skb, unsigned int len)
{
skb->data-=len;
skb->len+=len;
if(skb->data head) {
skb_under_panic(skb, len, current_text_addr());
}
return skb->data;
}

馬的,找到真正的原因了,Inferone提供的kernel裡有個Netfilter->Turbo NAT.拿掉就好了







沒有留言:

張貼留言