[asterisk-bugs] [DAHDI-linux 0016831]: [patch] adding ss7 pcap support to dahdi
Asterisk Bug Tracker
noreply at bugs.digium.com
Wed Mar 31 13:13:15 CDT 2010
A NOTE has been added to this issue.
======================================================================
https://issues.asterisk.org/view.php?id=16831
======================================================================
Reported By: tsearle
Assigned To:
======================================================================
Project: DAHDI-linux
Issue ID: 16831
Category: NewFeature
Reproducibility: always
Severity: minor
Priority: normal
Status: new
JIRA:
Reviewboard Link:
======================================================================
Date Submitted: 2010-02-15 16:20 CST
Last Modified: 2010-03-31 13:13 CDT
======================================================================
Summary: [patch] adding ss7 pcap support to dahdi
Description:
as per the thread on the libss7 mailing list
1. changes to the dahdi driver to add ioctls to mirror reads/writes
from a signaling channel to a pseudo channel
2. a corresponding user app to set up the mirroring and record the
traffic in a pcap
This seems to work though I'm not sure if it's the best solution
design-wise.
I might be abusing the pseudo channel concept.
to compile the app do the following
gcc dahdi_pcap.c -o dahdi_pcap -lpcap
and the syntax to run it is
./dahdi_pcap chan1 [chan2]* pcap.pcap
e.g.
./dahdi_pcap 16 47 test.pcap
======================================================================
----------------------------------------------------------------------
(0120039) nahuelgreco (reporter) - 2010-03-31 13:13
https://issues.asterisk.org/view.php?id=16831#c120039
----------------------------------------------------------------------
chan2 must be a real physical channel, that should be noted. If you try to
use a non existant channel kernel will oops:
[6125922.061667] dahdi: Master changed to TE4/0/1
[6126093.021402] dahdi: Chan 16 tx mirrored to 373
[6126093.021500] dahdi: Chan 16 rxmirrored to 374
[6126094.310416] dahdi: Chan 373 tx mirror to 16 stopped
[6126094.313991] dahdi: Chan 374 rx mirror to 16 stopped
[6126097.074642] dahdi: Chan 16 tx mirrored to 373
[6126097.074715] dahdi: Chan 16 rxmirrored to 374
[6126097.074781] dahdi: Chan 512 tx mirrored to 375
[6126097.074826] BUG: unable to handle kernel NULL pointer dereference at
00000000
[6126097.074891] IP: [<c02cbdb3>] _spin_lock_irqsave+0x25/0x5e
[6126097.074933] *pdpt = 0000000058618001 *pde = 0000000000000000
[6126097.074942] Oops: 0002 [https://issues.asterisk.org/view.php?id=1] SMP
[6126097.076782] Modules linked in: xpp_usb xpp wcb4xxp wctdm wcfxo
wctdm24xxp wcte11xp wct1xxp wcte12xp dahdi_voicebus wct4xxp dahdi nls_utf8
cifs nls_base nf_conntrack_ipv4 xt_state nf_conntrack xt_physdev
iptable_filter ip_tables x_tables firmware_class crc_ccitt bridge netloop
8021q ipv6 w83627hf hwmon_vid loop dm_crypt crypto_blkcipher parport_pc
intel_rng shpchp i2c_i801 parport evdev rng_core pcspkr i2c_core
pci_hotplug container button ext3 jbd mbcache dm_mod ide_disk ata_generic
ide_pci_generic uhci_hcd sata_sil libata scsi_mod dock e100 mii piix
ide_core e1000 ehci_hcd usbcore intel_agp agpgart thermal processor fan
thermal_sys [last unloaded: dahdi]
[6126097.076782]
[6126097.076782] Pid: 30163, comm: dahdi_pcap Not tainted
(2.6.26-2-xen-686 https://issues.asterisk.org/view.php?id=1)
[6126097.076782] EIP: 0061:[<c02cbdb3>] EFLAGS: 00010002 CPU: 2
[6126097.076782] EIP is at _spin_lock_irqsave+0x25/0x5e
[6126097.076782] EAX: 00000100 EBX: 00000000 ECX: c03d2ba8 EDX: f5656000
[6126097.076782] ESI: 00000000 EDI: d63cdc80 EBP: d63c6000 ESP: ecae1dc0
[6126097.076782] DS: 007b ES: 007b FS: 00d8 GS: 0033 SS: 0069
[6126097.076782] Process dahdi_pcap (pid: 30163, ti=ecae0000 task=cee574e0
task.ti=ecae0000)
[6126097.076782] Stack: ee35e536 00000200 00000177 ee358d8c ee35e536
ee36226c 00000200 00000177
[6126097.076782] bf9a81f4 ed403550 c0362220 00000000 c0152f8a
c0362220 00000000 00000000
[6126097.076782] 00000020 00000200 00000000 00000000 cee574e0
ecae1f14 00000080 f5656000
[6126097.076782] Call Trace:
[6126097.076782] [<ee358d8c>] dahdi_chanandpseudo_ioctl+0x257/0x124b
[dahdi]
[6126097.076782] [<c0152f8a>] __alloc_pages_internal+0xb5/0x34e
[6126097.076782] [<c0158aef>] mod_zone_page_state+0x30/0x5d
[6126097.076782] [<ee35bcfa>] dahdi_ioctl+0x1736/0x17e9 [dahdi]
[6126097.076782] [<ee35253e>] set_tone_zone+0x71/0x7e [dahdi]
[6126097.076782] [<ee352a15>] dahdi_specchan_open+0x4ca/0x526 [dahdi]
[6126097.076782] [<ee352bd3>] dahdi_open+0x162/0x182 [dahdi]
[6126097.076782] [<c0172a55>] chrdev_open+0x15b/0x191
[6126097.076782] [<c01728fa>] chrdev_open+0x0/0x191
[6126097.076782] [<c016ea14>] __dentry_open+0x130/0x1fc
[6126097.076782] [<c016eafc>] nameidata_to_filp+0x1c/0x2c
[6126097.076782] [<c0179a36>] do_filp_open+0x34f/0x684
[6126097.076782] [<ee35a5c4>] dahdi_ioctl+0x0/0x17e9 [dahdi]
[6126097.076782] [<c017a958>] vfs_ioctl+0x1c/0x5d
[6126097.076782] [<c017abe3>] do_vfs_ioctl+0x24a/0x261
[6126097.076782] [<c016e876>] do_sys_open+0xa8/0xb0
[6126097.076782] [<c017ac3b>] sys_ioctl+0x41/0x5a
[6126097.076782] [<c0103f76>] syscall_call+0x7/0xb
[6126097.076782] =======================
[6126097.076782] Code: c0 74 db 5b 5e c3 56 53 89 c3 83 ec 04 8b 15 c4 b1
35 c0 64 a1 04 b0 3b c0 c1 e0 06 0f b6 74 10 01 c6 44 10 01 01 b8 00 01 00
00 <f0> 66 0f c1 03 89 04 24 8b 04 24 ba 00 04 00 00 38 e0 74 09 4a
[6126097.076782] EIP: [<c02cbdb3>] _spin_lock_irqsave+0x25/0x5e SS:ESP
0069:ecae1dc0
[6126097.080598] ---[ end trace d840db0fcd0af415 ]---
I think you need to add some check to prevent this.
Issue History
Date Modified Username Field Change
======================================================================
2010-03-31 13:13 nahuelgreco Note Added: 0120039
======================================================================
More information about the asterisk-bugs
mailing list