From c4e9b5d56c4dccb7801346cb07d79d195c7cc2ca Mon Sep 17 00:00:00 2001 From: Shaun Ruffell Date: Wed, 17 Dec 2008 15:57:56 +0000 Subject: wcb4xxp: Do not propogate received HDLC frames on channels that are not configured. Issue: DAHDI-217 git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@5576 a0bf4364-ded3-4de4-8d8a-66a801d63aff --- drivers/dahdi/wcb4xxp/base.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'drivers') diff --git a/drivers/dahdi/wcb4xxp/base.c b/drivers/dahdi/wcb4xxp/base.c index 6f23206..27903ad 100644 --- a/drivers/dahdi/wcb4xxp/base.c +++ b/drivers/dahdi/wcb4xxp/base.c @@ -1579,7 +1579,8 @@ static int hdlc_rx_frame(struct b4xxp_span *bspan) spin_unlock_irqrestore(&b4->fifolock, irq_flags); /* don't send STAT byte to DAHDI */ - dahdi_hdlc_putbuf(bspan->sigchan, buf, (j == WCB4XXP_HDLC_BUF_LEN) ? j : j - 1); + if (bspan->sigchan) + dahdi_hdlc_putbuf(bspan->sigchan, buf, (j == WCB4XXP_HDLC_BUF_LEN) ? j : j - 1); zleft -= j; if (DBG_HDLC && DBG_SPANFILTER) { @@ -1595,6 +1596,11 @@ static int hdlc_rx_frame(struct b4xxp_span *bspan) get_F(f1, f2, flen); spin_unlock_irqrestore(&b4->fifolock, irq_flags); + /* If this channel is not configured with a signalling span we don't + * need to notify the rest of dahdi about this frame. */ + if (!bspan->sigchan) + return flen; + ++bspan->frames_in; if (zlen < 3) { if (DBG_HDLC && DBG_SPANFILTER) -- cgit v1.2.3