Re: SMPP implementation bug?

2004-07-17 Thread Stipe Tolj
Oscar Medina Duarte schrieb:
> 
> Hi all !
> 
> I think a have a small bug here, when an smsc sends a DeliverSM pdu to
> the gateway, with the fields, source_adde and destination_addr set to
> NULL, the bearerbox crashes with the following logs:
> 
> 2004-07-16 18:39:20 [15969] [6] PANIC: gwlib/octstr.c:2326:
> seems_valid_real: Assertion `ostr != NULL' failed. (Called from
> gwlib/octstr.c:807:octstr_check_range.)
> 2004-07-16 18:39:20 [15969] [6] PANIC: ./bearerbox(gw_panic+0x175)
> [0x80c8501]
> 2004-07-16 18:39:20 [15969] [6] PANIC: ./bearerbox [0x80ce67f]
> 2004-07-16 18:39:20 [15969] [6] PANIC:
> ./bearerbox(octstr_check_range+0x26) [0x80caaa3]
> 2004-07-16 18:39:20 [15969] [6] PANIC: ./bearerbox [0x807fecb]
> 2004-07-16 18:39:20 [15969] [6] PANIC: ./bearerbox [0x8081e9f]
> 2004-07-16 18:39:20 [15969] [6] PANIC: ./bearerbox [0x8082da9]
> 2004-07-16 18:39:20 [15969] [6] PANIC: ./bearerbox [0x80be000]
> 2004-07-16 18:39:20 [15969] [6] PANIC: /lib/tls/libpthread.so.0
> [0x86879c]
> 2004-07-16 18:39:20 [15969] [6] PANIC: /lib/tls/libc.so.6(__clone+0x5a)
> [0x6b527a]

ok, confirmed... by reviewing code.

Just checked the specs, it indicates the following for deliver_sm PDU:

source_addr may be NULL if unknown
destination_addr doesn't state if if "may" be NULLed, hence it may be,
right?

In any case, you are right. Kannel shouldn't panic here.

Adding this into mantis bug tracking.

Stipe

mailto:[EMAIL PROTECTED]
---
Wapme Systems AG

Vogelsanger Weg 80
40470 Düsseldorf, NRW, Germany

phone: +49.211.74845.0
fax: +49.211.74845.299

mailto:[EMAIL PROTECTED]
http://www.wapme-systems.de/
---

-BEGIN PGP PUBLIC KEY BLOCK-
Version: GnuPG v1.2.2 (Cygwin)

mIsEP6mcYwEEAMDnUiUwrbb+xwTFWN6TxF2+XZu7/alwJMeCwMBRvXtPZqfjpPhS
OkBpU0F4TrVuugz1HINTSaJTYq10AzDQXp5NkyWgckqW79nPAWuOX0dicbJk+cN2
nM2TI4KaxUDe6u8hghNEnH/i2lXsUu9apnP/iixzV81VC2je3uc9hZpnAAYptEVT
dGlwZSBUb2xqIChUZWNobm9sb2d5IENlbnRlciAmIFJlc2VhcmNoIExhYikgPHRv
bGpAd2FwbWUtc3lzdGVtcy5kZT6ItAQTAQIAHgUCP6mcYwIbAwYLCQgHAwIDFQID
AxYCAQIeAQIXgAAKCRABV0w1BqPYRuSqA/wPzsQxao2YePENCtgRTrO86U6zg3sl
OcS6CJFI4FZP5h/xD3GRsNH1+MPSvZlomDdpFnr547DGz/Kq9MXuQwVvlVig5yWZ
K5dtKp1r5YLhxJQBhfirZbRFFnYmf19f18J8OoS28tuFVftDl1AIwJS3HLyBTv6H
g2HyLAEKQIp30Q==
=aYCI
-END PGP PUBLIC KEY BLOCK-



RE: SMPP implementation bug?

2004-07-18 Thread Oscar Medina Duarte
Oups !!

Sorry I think I didn't explain myself correctly I should practice my
english a bit more, those modifications where to make Logica's Simulator
more use full for me, not to b able connect to it. Although there still
a bug in Kannel's smpp impl when handling NULL srcaddr in DeliverSM al
least...

Cheers !!

== Oscar

On Mon, 2004-07-19 at 15:52, Hillel Bilman wrote:
> Hi,
> 
> What modifications did you need to get Kannel to connect to the Logica's
> SMSC Simulator v 1.1? I'd like to test.
> 
> Thanks
> 
> -Original Message-
> From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
> Behalf Of Oscar Medina Duarte
> Sent: Friday, July 16, 2004 4:51 PM
> To: [EMAIL PROTECTED]
> Subject: SMPP implementation bug?
> 
> 
> Hi all !
> 
> I think a have a small bug here, when an smsc sends a DeliverSM pdu to
> the gateway, with the fields, source_adde and destination_addr set to
> NULL, the bearerbox crashes with the following logs:
> 
> 
> 2004-07-16 18:39:20 [15969] [6] PANIC: gwlib/octstr.c:2326:
> seems_valid_real: Assertion `ostr != NULL' failed. (Called from
> gwlib/octstr.c:807:octstr_check_range.)
> 2004-07-16 18:39:20 [15969] [6] PANIC: ./bearerbox(gw_panic+0x175)
> [0x80c8501]
> 2004-07-16 18:39:20 [15969] [6] PANIC: ./bearerbox [0x80ce67f]
> 2004-07-16 18:39:20 [15969] [6] PANIC:
> ./bearerbox(octstr_check_range+0x26) [0x80caaa3]
> 2004-07-16 18:39:20 [15969] [6] PANIC: ./bearerbox [0x807fecb]
> 2004-07-16 18:39:20 [15969] [6] PANIC: ./bearerbox [0x8081e9f]
> 2004-07-16 18:39:20 [15969] [6] PANIC: ./bearerbox [0x8082da9]
> 2004-07-16 18:39:20 [15969] [6] PANIC: ./bearerbox [0x80be000]
> 2004-07-16 18:39:20 [15969] [6] PANIC: /lib/tls/libpthread.so.0
> [0x86879c]
> 2004-07-16 18:39:20 [15969] [6] PANIC: /lib/tls/libc.so.6(__clone+0x5a)
> [0x6b527a]
> 
> Instead of PANIC there should be proper handling of this king of
> messages according to SMPP v 0x34. Or perhaps I'm misunderstanding some
> config file spot, so here I'm also sending the config file:
> 
> group = core
> admin-port = 6669
> admin-password = f00bar
> status-password = f00bar
> admin-deny-ip = "*.*.*.*"
> admin-allow-ip = "127.0.0.1"
> smsbox-port = 6667
> # wapbox-port = 6668
> box-deny-ip = "*.*.*.*"
> box-allow-ip = "127.0.0.1"
> wdp-interface-name = "*"
> log-file = "kannel.log"
> log-level = 1
> access-log = "kannel.access"
>  
> group = smsbox
> bearerbox-host = localhost
> sendsms-port = 64235
> global-sender = 64235
>  
> 
> group = smsc
> smsc = smpp
> host = 127.0.0.1
> port = 
> transceiver-mode = true
> smsc-username = pavel
> smsc-password = wpsd
> system-type = VMA
> interface-version = 0x34
> enquire-link-interval = 60
> max-pending-submits = 10
> reconnect-delay = 30
> source-addr-ton = 0
> source-addr-npi = 1
> source-addr-autodetect = true
> dest-addr-ton = 0
> dest-addr-npi = 2
>  
> group = sms-service
> keyword = de
> text = "de bolas "
> catch-all = true
>  
> group = sms-service
> keyword = default
> text = "No se que quieres !"
>  
> group = sms-service
> keyword = www
> get-url = "http://%S";
>  
> group = sendsms-user
> username = foo
> password = bar
> 
> What should I do to correct this !??
> 
> Note: The log was generated by Kannel 1.3.2
> 
> When I use stable Kannel 1.2.1, it doesnt generate any log file info,
> but it just dont completes the service transaction.
> 
> I performed those tests using Logica's Open SMPP API v 1.3 and Logica's
> SMSC Simulator v 1.1, with few modifications.
> 
> 
> Thank to all for you're valuable info and help !!!
> 
> == Oscar
> OM MANI PEME HUM
> 
> 
> 
> 




Re: SMPP implementation bug?

2004-07-18 Thread Alexander Malysh
Hi,

this bug fixed in cvs. please try it out...
Thanks a lot!

Oscar Medina Duarte wrote:

> Hi all !
> 
> I think a have a small bug here, when an smsc sends a DeliverSM pdu to
> the gateway, with the fields, source_adde and destination_addr set to
> NULL, the bearerbox crashes with the following logs:
> 
> 
> 2004-07-16 18:39:20 [15969] [6] PANIC: gwlib/octstr.c:2326:
> seems_valid_real: Assertion `ostr != NULL' failed. (Called from
> gwlib/octstr.c:807:octstr_check_range.)
> 2004-07-16 18:39:20 [15969] [6] PANIC: ./bearerbox(gw_panic+0x175)
> [0x80c8501]
> 2004-07-16 18:39:20 [15969] [6] PANIC: ./bearerbox [0x80ce67f]
> 2004-07-16 18:39:20 [15969] [6] PANIC:
> ./bearerbox(octstr_check_range+0x26) [0x80caaa3]
> 2004-07-16 18:39:20 [15969] [6] PANIC: ./bearerbox [0x807fecb]
> 2004-07-16 18:39:20 [15969] [6] PANIC: ./bearerbox [0x8081e9f]
> 2004-07-16 18:39:20 [15969] [6] PANIC: ./bearerbox [0x8082da9]
> 2004-07-16 18:39:20 [15969] [6] PANIC: ./bearerbox [0x80be000]
> 2004-07-16 18:39:20 [15969] [6] PANIC: /lib/tls/libpthread.so.0
> [0x86879c]
> 2004-07-16 18:39:20 [15969] [6] PANIC: /lib/tls/libc.so.6(__clone+0x5a)
> [0x6b527a]
> 
> Instead of PANIC there should be proper handling of this king of
> messages according to SMPP v 0x34. Or perhaps I'm misunderstanding some
> config file spot, so here I'm also sending the config file:
> 
> group = core
> admin-port = 6669
> admin-password = f00bar
> status-password = f00bar
> admin-deny-ip = "*.*.*.*"
> admin-allow-ip = "127.0.0.1"
> smsbox-port = 6667
> # wapbox-port = 6668
> box-deny-ip = "*.*.*.*"
> box-allow-ip = "127.0.0.1"
> wdp-interface-name = "*"
> log-file = "kannel.log"
> log-level = 1
> access-log = "kannel.access"
>  
> group = smsbox
> bearerbox-host = localhost
> sendsms-port = 64235
> global-sender = 64235
>  
>  
> group = smsc
> smsc = smpp
> host = 127.0.0.1
> port = 
> transceiver-mode = true
> smsc-username = pavel
> smsc-password = wpsd
> system-type = VMA
> interface-version = 0x34
> enquire-link-interval = 60
> max-pending-submits = 10
> reconnect-delay = 30
> source-addr-ton = 0
> source-addr-npi = 1
> source-addr-autodetect = true
> dest-addr-ton = 0
> dest-addr-npi = 2
>  
> group = sms-service
> keyword = de
> text = "de bolas "
> catch-all = true
>  
> group = sms-service
> keyword = default
> text = "No se que quieres !"
>  
> group = sms-service
> keyword = www
> get-url = "http://%S";
>  
> group = sendsms-user
> username = foo
> password = bar
> 
> What should I do to correct this !??
> 
> Note: The log was generated by Kannel 1.3.2
> 
> When I use stable Kannel 1.2.1, it doesnt generate any log file info,
> but it just dont completes the service transaction.
> 
> I performed those tests using Logica's Open SMPP API v 1.3 and Logica's
> SMSC Simulator v 1.1, with few modifications.
> 
> 
> Thank to all for you're valuable info and help !!!
> 
> == Oscar
> OM MANI PEME HUM