linux-atm: Solos card requires explicit buffer size to br2684ctl
authorFelix Fietkau <nbd@openwrt.org>
Sun, 20 Mar 2011 01:21:49 +0000 (01:21 +0000)
committerFelix Fietkau <nbd@openwrt.org>
Sun, 20 Mar 2011 01:21:49 +0000 (01:21 +0000)
The default send buffer size of 8192 potentially can run past the end of the buffer (skb) and trash memory.
Explicitly setting a limit is required.

(Patch by Philip Prindeville)

SVN-Revision: 26242

package/linux-atm/files/br2684ctl

index 929e2b887eac2b2f9ff922fd025e1cd4ab56e6eb..0c6fa9575ff136d0e92b8ab82f550c67cb4633d5 100755 (executable)
@@ -35,12 +35,15 @@ start_daemon() {
        local qos
        config_get qos "$cfg" qos
 
+       local sendsize
+       config_get sendsize "$cfg" sendsize
+
        local circuit="$atmdev.$vpi.$vci"
        local pid="/var/run/br2684ctl-$circuit.pid"
 
        start-stop-daemon -S -b -x /usr/sbin/br2684ctl -m -p "$pid" -- \
                -c "$unit" -e "$encaps" -p "$payload" \
-               -a "$circuit" ${qos:+-q "$qos"}
+               -a "$circuit" ${qos:+-q "$qos"} ${sendsize:+-s "$sendsize"}
 }
 
 start() {