2009-08-26 20:52:56 Small but Powerful P2P VPN software on blackfin
Li Yuqian (CHINA)
Message: 79254
Hi,
we are just ported N2N - it is a small but powerful p2p vpn software to blackfin platform, running stable and good on our FX02/FX08/FX12/ED1 IPPBX system, hope this post can useful for who want try VPN on blackfin BF532/533/537 CPU
more information, try get it on www.edgepbx.cn/svn/nanoast/trunk/package/n2n/n2n.mk?root=edgepbx&view=markup
and we think N2N sometime can replace the OpenVPN. have fun and try it.
regards,
QuoteReplyEditDelete
2009-08-27 04:03:35 Re: Small but Powerful P2P VPN software on blackfin
Mike Frysinger (UNITED STATES)
Message: 79272
ive added it to the uclinux-dist and it seems to work initially, but then it hits an unaligned access
your .mk file doesnt appear to make any changes ... are you not having unaligned proplems ?
this crash is from a simple ping. the offset is for:
edge.c:check_received_packet()
and is basically this code:
struct ip *the_ip = (struct ip*)(pkt+sizeof(struct ether_header));
if((the_ip->ip_dst.s_addr != eee->device.ip_addr)
&& ((the_ip->ip_dst.s_addr & eee->device.device_mask) != (eee->device.ip_addr & eee->device.device_mask)) /* Not a broadcast */
&& ((the_ip->ip_dst.s_addr & 0xE0000000) != (0xE0000000 /* 224.0.0.0-239.255.255.255 */)) /* Not a multicast */
&& ((the_ip->ip_dst.s_addr) != (bcast.s_addr)) /* always broadcast (RFC919) */
&& (!(eee->allow_routing)) /* routing is enabled so let it in */
)
01/Aug/2029 14:41:22 [ edge.c:1435] STATUS: pending=0, operational=0
Data access misaligned address violation
- Attempted misaligned data memory or data cache access.
Deferred Exception context
CURRENT PROCESS:
COMM=edge PID=164
CPU = 0
TEXT = 0x00470000-0x004786f8 DATA = 0x004406f8-0x00451dec
BSS = 0x00451dec-0x00380000 USER-STACK = 0x0039fe70
return address: [0x004728ae]; contents of:
0x00472880: 005c 304c 5006 64b1 6032 325d e3ff f5f0
0x00472890: 0c00 1081 300d e122 0352 325d e428 0004
0x004728a0: b0f0 6008 e300 081a 2f5a 3254 6c72 [a112]
0x004728b0: 3216 e410 0019 0802 1b52 0000 0000 5810
ADSP-BF537-0.2 500(MHz CCLK) 125(MHz SCLK) (mpu off)
Linux version 2.6.30.5-ADI-2010R1-pre (vapier@vapier-m) (gcc version 4.3.4 (ADI-trunk/git-c4c6434) ) #51 Thu Aug 27 02:40:48 EDT 2009
SEQUENCER STATUS: Not tainted
SEQSTAT: 00062024 IPEND: 0008 IMASK: ffff SYSCFG: 0006
EXCAUSE : 0x24
physical IVG3 asserted : <0xffa00718> { _trap + 0x0 }
RETE: <0x00000000> /* Maybe null pointer? */
RETN: <0x003ec000> /* kernel dynamic memory */
RETX: <0x00000480> /* Maybe fixed code section */
RETS: <0x00472728> [ /bin/edge + 0x2728 ]
PC : <0x004728ae> [ /bin/edge + 0x28ae ]
DCPLB_FAULT_ADDR: <0x0039ea88> [ edge + 0x1ea88 ]
ICPLB_FAULT_ADDR: <0x004728ae> [ /bin/edge + 0x28ae ]
PROCESSOR STATE:
R0 : 00000800 R1 : 00000800 R2 : 00000000 R3 : 00000003
R4 : 0039fa70 R5 : 00476bb0 R6 : 0039fc0c R7 : 00000062
P0 : 003fc1f4 P1 : 00000010 P2 : 0039ea7a P3 : 0043d2b0
P4 : 0039ea6c P5 : 00440aa0 FP : 0039fb58 SP : 003ebf24
LB0: 0041fef3 LT0: 0041fef2 LC0: 00000000
LB1: 004761d3 LT1: 004761bc LC1: 00000000
B0 : 00003fff L0 : 00000000 M0 : 0039eaca I0 : 0039e9cc
B1 : 000007ff L1 : 00000000 M1 : ffffff01 I1 : 00000000
B2 : 0000201f L2 : 00000000 M2 : 0039e2b0 I2 : 00000005
B3 : 00000000 L3 : 00000000 M3 : 00090034 I3 : 0039eaa0
A0.w: 00000006 A0.x: 00000000 A1.w: 00000006 A1.x: 00000000
USP : 0039ea3c ASTAT: 02003025
Hardware Trace:
0 Target : <0x00004f74> { _trap_c + 0x0 }
Source : <0xffa006ac> { _exception_to_level5 + 0xa4 } CALL pcrel
1 Target : <0xffa00608> { _exception_to_level5 + 0x0 }
Source : <0xffa004bc> { _bfin_return_from_exception + 0x20 } RTX
2 Target : <0xffa0049c> { _bfin_return_from_exception + 0x0 }
Source : <0xffa00560> { _ex_trap_c + 0x74 } JUMP.S
3 Target : <0xffa004ec> { _ex_trap_c + 0x0 }
Source : <0xffa00780> { _trap + 0x68 } JUMP (P4)
4 Target : <0xffa00738> { _trap + 0x20 }
Source : <0xffa00734> { _trap + 0x1c } IF !CC JUMP
5 Target : <0xffa00718> { _trap + 0x0 }
Source : <0x004728ac> [ /bin/edge + 0x28ac ] 0x6c72
6 Target : <0x004728aa> [ /bin/edge + 0x28aa ]
Source : <0x0047275a> [ /bin/edge + 0x275a ] IF !CC JUMP
7 Target : <0x00472728> [ /bin/edge + 0x2728 ]
Source : <0x004764f4> [ /bin/edge + 0x64f4 ] RTS
8 Target : <0x004764f0> [ /bin/edge + 0x64f0 ]
Source : <0x0047640a> [ /bin/edge + 0x640a ] RTS
9 Target : <0x00476402> [ /bin/edge + 0x6402 ]
Source : <0x004763d0> [ /bin/edge + 0x63d0 ] IF !CC JUMP
10 Target : <0x004763ca> [ /bin/edge + 0x63ca ]
Source : <0x0047642c> [ /bin/edge + 0x642c ] JUMP.S
11 Target : <0x0047642c> [ /bin/edge + 0x642c ]
Source : <0x00476214> [ /bin/edge + 0x6214 ] RTS
12 Target : <0x004761e4> [ /bin/edge + 0x61e4 ]
Source : <0x00476200> [ /bin/edge + 0x6200 ] IF CC JUMP
13 Target : <0x004761f0> [ /bin/edge + 0x61f0 ]
Source : <0x004761e2> [ /bin/edge + 0x61e2 ] JUMP.S
14 Target : <0x004761b0> [ /bin/edge + 0x61b0 ]
Source : <0x004760ea> [ /bin/edge + 0x60ea ] RTS
15 Target : <0x004760de> [ /bin/edge + 0x60de ]
Source : <0x0041ff04> [ /lib/libc.so.0 + 0x1ff04 ] RTS
QuoteReplyEditDelete
2009-08-27 04:29:49 Re: Small but Powerful P2P VPN software on blackfin
Li Yuqian (CHINA)
Message: 79274
Hi Mike,
yes, we have a patch for that unaligned problem, please checking on www.edgepbx.cn/svn/nanoast/trunk/package/n2n/?root=edgepbx
regards,
QuoteReplyEditDelete
2009-08-27 04:43:23 Re: Small but Powerful P2P VPN software on blackfin
Mike Frysinger (UNITED STATES)
Message: 79276
thanks, that seemed to fix things
btw, the change to remove daemon() is no longer needed. upgrade your toolchain and the latest uClibc supports daemon() now.
QuoteReplyEditDelete
2009-08-27 04:50:21 Re: Small but Powerful P2P VPN software on blackfin
Li Yuqian (CHINA)
Message: 79277
Hi Mike,
Thanks, i will try new toolchain and uClibc for daemon().
regards,
QuoteReplyEditDelete
2010-07-09 10:40:45 Re: Small but Powerful P2P VPN software on blackfin
Ali Benbrahim (TUNISIA)
Message: 91108
hi Li,
we are trying to use n2n on our IP08 but it seem to be unstable. (freezing, unreachable on supernode ...) , we are looking for the patch , but edgepbx.cn seem to be unreachable !
thanks for your support.
Ali.