[asterisk-bugs] [JIRA] (DAHLIN-381) Bypassed HDLC handler for outgoing packets

Alexei A Smekalkine (JIRA) noreply at issues.asterisk.org
Sun Aug 30 11:30:43 CDT 2020


Alexei A Smekalkine created DAHLIN-381:
------------------------------------------

             Summary: Bypassed HDLC handler for outgoing packets
                 Key: DAHLIN-381
                 URL: https://issues.asterisk.org/jira/browse/DAHLIN-381
             Project: DAHDI-Linux
          Issue Type: Bug
      Security Level: None
          Components: dahdi (the module)
    Affects Versions: 2.11.1, 3.0.0, 3.1.0
            Reporter: Alexei A Smekalkine
            Assignee: Keith Morgan


The HDLC encapsulation module can add its own headers and trailers to the packet. For correct operation in this case, it is necessary to send a packet from DAHDI to the appropriate HDLC handler. The HDLC handler, in turn, should call the device driver procedure to transfer the packet.

An example of such a module is our [Cisco HDLC Ethernet encapsulation|https://github.com/ikle/ds/blob/master/linux/hdlc_cisco_eth.c#L80].

Thus, for correct processing of outgoing packets, we should use function hdlc_start_xmit from Linux HDLC stack as a ndo_start_xmit procedure.

(Note that if the protocol handler does not provide a xmit procedure, then function hdlc_start_xmit will call the hardware driver directly.)
    
In the case of DAHDI, the packet transfer procedure (device driver xmit procedure) is set in function dahdi_ioctl_chanconfig to dahdi_xmit:
{code:c}
dev_to_hdlc(chan->hdlcnetdev->netdev)->xmit = dahdi_xmit;
{code}



--
This message was sent by Atlassian JIRA
(v6.2#6252)



More information about the asterisk-bugs mailing list