From fe96a30dd9fe7eb2488ec640aad04c370bc816cc Mon Sep 17 00:00:00 2001 From: ke hu <ke.hu@iopsys.eu> Date: Thu, 13 Feb 2020 12:05:46 +0100 Subject: [PATCH] ppacmd : add an extra check for accelerator entries If it is not in the hw table, do not modify it --- ppa-drv/files/usr/sbin/ppacmd | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/ppa-drv/files/usr/sbin/ppacmd b/ppa-drv/files/usr/sbin/ppacmd index 158383f..d276475 100755 --- a/ppa-drv/files/usr/sbin/ppacmd +++ b/ppa-drv/files/usr/sbin/ppacmd @@ -63,7 +63,8 @@ while getopts "s:g:l:w:i:f:" opt; do done ses=$(cat /proc/ppa/api/mini_session |tr -d ' ' |grep "${group}|${wan}" |sort -u |cut -d '|' -f 6) -if [ -n "$lan" -a -n "$ses" ]; then +hws=$(cat /proc/ppa/pae/route | grep "${group}") +if [ -n "$lan" -a -n "$ses" -a -n "$hws" ]; then route_modify ${ses} "${lan}" else $ORI_PPACMD addmc $@ -- GitLab