[zaptel-commits] tzafrir: branch 1.4 r4588 - /branches/1.4/kernel/
SVN commits to the Zaptel project
zaptel-commits at lists.digium.com
Tue Nov 25 15:01:05 CST 2008
Author: tzafrir
Date: Tue Nov 25 15:01:04 2008
New Revision: 4588
URL: http://svn.digium.com/view/zaptel?view=rev&rev=4588
Log:
Fix handling of an invalid timing (sync) parameter in DAHDI_SPANCONFIG.
Fixing issue #13954 in zaptel 1.4
Modified:
branches/1.4/kernel/tor2.c
branches/1.4/kernel/torisa.c
branches/1.4/kernel/wct1xxp.c
branches/1.4/kernel/wcte11xp.c
Modified: branches/1.4/kernel/tor2.c
URL: http://svn.digium.com/view/zaptel/branches/1.4/kernel/tor2.c?view=diff&rev=4588&r1=4587&r2=4588
==============================================================================
--- branches/1.4/kernel/tor2.c (original)
+++ branches/1.4/kernel/tor2.c Tue Nov 25 15:01:04 2008
@@ -203,6 +203,11 @@
if (debug)
printk("Tor2: Configuring span %d\n", span->spanno);
+ if ((lc->sync < 0) || (lc->sync >= SPANS_PER_CARD)) {
+ printk(KERN_WARNING "%s %d: invalid span timing value %d.\n",
+ THIS_MODULE->name, span->spanno, lc->sync);
+ return -EINVAL;
+ }
span->syncsrc = p->tor->syncsrc;
/* remove this span number from the current sync sources, if there */
Modified: branches/1.4/kernel/torisa.c
URL: http://svn.digium.com/view/zaptel/branches/1.4/kernel/torisa.c?view=diff&rev=4588&r1=4587&r2=4588
==============================================================================
--- branches/1.4/kernel/torisa.c (original)
+++ branches/1.4/kernel/torisa.c Tue Nov 25 15:01:04 2008
@@ -603,6 +603,11 @@
if (debug)
printk("TorISA: Configuring span %d\n", span->spanno);
+ if ((lc->sync < 0) || (lc->sync >= 2)) {
+ printk(KERN_WARNING "%s %d: invalid span timing value %d.\n",
+ THIS_MODULE->name, span->spanno, lc->sync);
+ return -EINVAL;
+ }
span->syncsrc = syncsrc;
/* remove this span number from the current sync sources, if there */
Modified: branches/1.4/kernel/wct1xxp.c
URL: http://svn.digium.com/view/zaptel/branches/1.4/kernel/wct1xxp.c?view=diff&rev=4588&r1=4587&r2=4588
==============================================================================
--- branches/1.4/kernel/wct1xxp.c (original)
+++ branches/1.4/kernel/wct1xxp.c Tue Nov 25 15:01:04 2008
@@ -739,7 +739,7 @@
struct t1xxp *wc = span->pvt;
/* Do we want to SYNC on receive or not */
- wc->sync = lc->sync;
+ wc->sync = (lc->sync) ? 1 : 0;
/* If already running, apply changes immediately */
if (span->flags & ZT_FLAG_RUNNING)
return t1xxp_startup(span);
Modified: branches/1.4/kernel/wcte11xp.c
URL: http://svn.digium.com/view/zaptel/branches/1.4/kernel/wcte11xp.c?view=diff&rev=4588&r1=4587&r2=4588
==============================================================================
--- branches/1.4/kernel/wcte11xp.c (original)
+++ branches/1.4/kernel/wcte11xp.c Tue Nov 25 15:01:04 2008
@@ -947,7 +947,7 @@
struct t1 *wc = span->pvt;
/* Do we want to SYNC on receive or not */
- wc->sync = lc->sync;
+ wc->sync = (lc->sync) ? 1 : 0;
/* If already running, apply changes immediately */
if (span->flags & ZT_FLAG_RUNNING)
return t1xxp_startup(span);
More information about the zaptel-commits
mailing list