From 4f32be505bc07b3292804a2a0094d8602aa5e457 Mon Sep 17 00:00:00 2001 From: AmadeusGhost <42570690+AmadeusGhost@users.noreply.github.com> Date: Tue, 21 Jan 2020 18:28:25 +0800 Subject: [PATCH] package: fix issues (#2831) --- package/lean/autocore/files/autocore | 65 ++++++----- package/lean/autocore/files/sbin/cpuinfo | 9 +- package/lean/autocore/files/sbin/ethinfo | 18 ++-- package/lean/automount/files/15-automount | 30 +++--- .../lean/automount/files/zzz-move-automount | 3 - package/lean/autosamba/files/20-smb | 101 +++++++++--------- .../files/zzz-default-settings | 7 +- .../default-settings/i18n/default.zh-cn.po | 2 +- .../lean/default-settings/i18n/more.zh-cn.po | 1 - .../lean/default-settings/i18n/sqm.zh-cn.po | 2 +- .../files/etc/dnsforwarder/gfw.txt | 3 +- .../files/usr/share/dnsforwarder/gfwlist.sh | 4 +- .../files/etc/gfwlist/china-banned | 5 + .../ipset-lists/files/etc/init.d/ipset.sh | 1 - package/lean/ipset-lists/po/zh_CN/gfwlist.po | 1 - .../lean/ipset-lists/tools/base-gfwlist.txt | 5 + .../ipset-lists/tools/gen-china-routes.sh | 20 ++-- package/lean/ipset-lists/tools/gen-gfwlist.sh | 18 ++-- package/lean/ipset-lists/tools/ipv4_merger.c | 29 +++-- package/lean/kcptun/Makefile | 2 +- .../root/usr/share/adbyby/adblack.conf | 1 - 21 files changed, 159 insertions(+), 168 deletions(-) diff --git a/package/lean/autocore/files/autocore b/package/lean/autocore/files/autocore index f372db0a6..55cd519f5 100755 --- a/package/lean/autocore/files/autocore +++ b/package/lean/autocore/files/autocore @@ -5,36 +5,36 @@ START=99 start() { - rfc=4096 - cc=$(grep -c processor /proc/cpuinfo) - rsfe=$(echo $cc*$rfc | bc) - sysctl -w net.core.rps_sock_flow_entries=$rsfe - for fileRps in $(ls /sys/class/net/eth*/queues/rx-*/rps_cpus) - do - echo $cc > $fileRps - done - - for fileRfc in $(ls /sys/class/net/eth*/queues/rx-*/rps_flow_cnt) - do - echo $rfc > $fileRfc - done + rfc=4096 + cc=$(grep -c processor /proc/cpuinfo) + rsfe=$(echo $cc*$rfc | bc) + sysctl -w net.core.rps_sock_flow_entries=$rsfe + for fileRps in $(ls /sys/class/net/eth*/queues/rx-*/rps_cpus) + do + echo $cc > $fileRps + done + + for fileRfc in $(ls /sys/class/net/eth*/queues/rx-*/rps_flow_cnt) + do + echo $rfc > $fileRfc + done + + for fileRps in $(ls /sys/class/net/eth*/queues/tx-*/xps_cpus) + do + echo $cc > $fileRps + done + + a=$(cat /proc/cpuinfo | grep name | cut -f2 -d: | uniq) + b=$(echo -n ' : ') + c=$(cat /proc/cpuinfo | grep 'core id' | sort -u | wc -l) + d=$(echo -n ' Core ') + e=$(cat /proc/cpuinfo | grep 'processor' | wc -l) + f=$(echo -n ' Thread ') + g=${a}${b}${c}${d}${e}${f} + + mkdir -p /tmp/sysinfo + echo $g > /tmp/sysinfo/model - for fileRps in $(ls /sys/class/net/eth*/queues/tx-*/xps_cpus) - do - echo $cc > $fileRps - done - - a=$(cat /proc/cpuinfo | grep name | cut -f2 -d: | uniq) - b=$(echo -n ' : ') - c=$(cat /proc/cpuinfo | grep 'core id' | sort -u | wc -l) - d=$(echo -n ' Core ') - e=$(cat /proc/cpuinfo | grep 'processor' | wc -l) - f=$(echo -n ' Thread ') - g=${a}${b}${c}${d}${e}${f} - - mkdir -p /tmp/sysinfo - echo $g > /tmp/sysinfo/model - a=$(ip address | grep ^[0-9] | awk -F: '{print $2}' | sed "s/ //g" | grep '^[e]' | grep -v "@" | grep -v "\.") b=$(echo "$a" | wc -l) for i in $(seq 1 $b) @@ -49,9 +49,6 @@ start() ethtool -K $c tso on >/dev/null 2>&1 ethtool -K $c ufo on >/dev/null 2>&1 done - - [ -f /etc/index.htm ] && mv /etc/index.htm /usr/lib/lua/luci/view/admin_status/index.htm + + [ -f /etc/index.htm ] && mv /etc/index.htm /usr/lib/lua/luci/view/admin_status/index.htm } - - - diff --git a/package/lean/autocore/files/sbin/cpuinfo b/package/lean/autocore/files/sbin/cpuinfo index acbc1ac7e..19ea5fb29 100755 --- a/package/lean/autocore/files/sbin/cpuinfo +++ b/package/lean/autocore/files/sbin/cpuinfo @@ -2,19 +2,17 @@ info() { - - #获取CPU工作频率 MHz=`grep 'MHz' /proc/cpuinfo | cut -c11- |sed -n '1p'` + #获取CPU工作频率 sensors >/dev/null if [ $? -eq 0 ];then - + a=`sensors | grep 'Core 0' | cut -c10-24` #获取CPU核心1温度 - a=`sensors | grep 'Core 0' | cut -c10-24` else - a="" + a="" fi } @@ -25,4 +23,3 @@ out() } out - diff --git a/package/lean/autocore/files/sbin/ethinfo b/package/lean/autocore/files/sbin/ethinfo index 63a0409c3..ee27a655c 100755 --- a/package/lean/autocore/files/sbin/ethinfo +++ b/package/lean/autocore/files/sbin/ethinfo @@ -8,25 +8,25 @@ echo -n "[" > /tmp/state/ethinfo for i in $(seq 1 $b) do - h=$(echo '{"name":' ) + h=$(echo '{"name":' ) c=$(echo "$a" | sed -n ${i}p) d=$(ethtool $c) - + e=$(echo "$d" | grep "Link detected" | awk -F: '{printf $2}' | sed 's/^[ \t]*//g') if [ $e = yes ]; then - l=1 - else - l=0 + l=1 + else + l=0 fi f=$(echo "$d" | grep "Speed" | awk -F: '{printf $2}' | sed 's/^[ \t]*//g' | tr -d "Unknown!") [ -z "$f" ] && f=" - " - + g=$(echo "$d" | grep "Duplex" | awk -F: '{printf $2}' | sed 's/^[ \t]*//g') if [ "$g" == "Full" ]; then - x=1 - else - x=0 + x=1 + else + x=0 fi echo -n "$h \"$c\", \"status\": $l, \"speed\": \"$f\", \"duplex\": $x}," >> /tmp/state/ethinfo diff --git a/package/lean/automount/files/15-automount b/package/lean/automount/files/15-automount index dd518c4ec..dc052bdd3 100755 --- a/package/lean/automount/files/15-automount +++ b/package/lean/automount/files/15-automount @@ -10,18 +10,18 @@ skip=`block info | sed 's/\(.*\): .*/\1/' | grep -q $device ; echo $?` path=$DEVPATH if [ $basename != "block" ] && [ -z "${device##sd*}" ] && [ $skip -eq 1 ]; then - mntpnt=$device - case "$ACTION" in - add) - mkdir -p /mnt/$mntpnt - chmod 777 /mnt/$mntpnt - # Try to be gentle on solid state devices - mount -o rw,noatime,discard /dev/$device /mnt/$mntpnt - ;; - remove) - # Once the device is removed, the /dev entry disappear. We need mountpoint - mountpoint=`mount |grep /dev/$device | sed 's/.* on \(.*\) type.*/\1/'` - umount -l $mountpoint - ;; - esac -fi \ No newline at end of file + mntpnt=$device + case "$ACTION" in + add) + mkdir -p /mnt/$mntpnt + chmod 777 /mnt/$mntpnt + # Try to be gentle on solid state devices + mount -o rw,noatime,discard /dev/$device /mnt/$mntpnt + ;; + remove) + # Once the device is removed, the /dev entry disappear. We need mountpoint + mountpoint=`mount |grep /dev/$device | sed 's/.* on \(.*\) type.*/\1/'` + umount -l $mountpoint + ;; + esac +fi diff --git a/package/lean/automount/files/zzz-move-automount b/package/lean/automount/files/zzz-move-automount index fbe094cbd..a399aa2b3 100755 --- a/package/lean/automount/files/zzz-move-automount +++ b/package/lean/automount/files/zzz-move-automount @@ -2,6 +2,3 @@ sleep 15 mv /etc/15-automount /etc/hotplug.d/block/ - - - diff --git a/package/lean/autosamba/files/20-smb b/package/lean/autosamba/files/20-smb index 72e6faf75..27ad91eab 100755 --- a/package/lean/autosamba/files/20-smb +++ b/package/lean/autosamba/files/20-smb @@ -1,11 +1,12 @@ #!/bin/sh -# -# D-Team Technology Co.,Ltd. ShenZhen -# 作者:Vic -# + +# +# D-Team Technology Co.,Ltd. ShenZhen +# 作者:Vic # # 警告:对着屏幕的哥们,我们允许你使用此脚本,但不允许你抹去作者的信息,请保留这段话。 # + . /lib/functions.sh . /lib/functions/service.sh @@ -13,20 +14,20 @@ global=0 config_file="/etc/config/samba" wait_for_init() { - for i in `seq 30` - do - [ -e /tmp/procd.done ] || { - sleep 1; continue; - } - return - done + for i in `seq 30` + do + [ -e /tmp/procd.done ] || { + sleep 1; continue; + } + return + done } smb_handle() { - config_get path $1 path - if [ "$path" = "$2" ] ;then - global=1 - fi + config_get path $1 path + if [ "$path" = "$2" ] ;then + global=1 + fi } chk_en() { @@ -41,53 +42,53 @@ device=`basename $DEVPATH` case "$ACTION" in add) - - case "$device" in - sd*) ;; - md*) ;; - hd*);; - mmcblk*);; - *) return;; - esac - - path="/dev/$device" - wait_for_init + case "$device" in + sd*);; + md*);; + hd*);; + mmcblk*);; + *) return;; + esac - cat /proc/mounts | while read j - do - str=${j%% *} - if [ "$str" == $path ];then - strr=${j#* } - target=${strr%% *} - global=0 - config_foreach smb_handle sambashare $target - name=${target#*/mnt/} + path="/dev/$device" - if [ $global -eq 0 ] ;then - echo -e "\n\nconfig sambashare" >> $config_file - echo -e "\toption auto '1'" >> $config_file - echo -e "\toption name '$name'" >> $config_file - echo -e "\toption path '$target'" >> $config_file - echo -e "\toption read_only 'no'" >> $config_file - echo -e "\toption guest_ok 'yes'" >> $config_file - echo -e "\toption create_mask '0666'" >> $config_file - echo -e "\toption dir_mask '0777'" >> $config_file - echo -e "\toption device '$device'" >> $config_file + wait_for_init + + cat /proc/mounts | while read j + do + str=${j%% *} + if [ "$str" == $path ];then + strr=${j#* } + target=${strr%% *} + global=0 + config_foreach smb_handle sambashare $target + name=${target#*/mnt/} + + if [ $global -eq 0 ] ;then + echo -e "\n\nconfig sambashare" >> $config_file + echo -e "\toption auto '1'" >> $config_file + echo -e "\toption name '$name'" >> $config_file + echo -e "\toption path '$target'" >> $config_file + echo -e "\toption read_only 'no'" >> $config_file + echo -e "\toption guest_ok 'yes'" >> $config_file + echo -e "\toption create_mask '0666'" >> $config_file + echo -e "\toption dir_mask '0777'" >> $config_file + echo -e "\toption device '$device'" >> $config_file /etc/init.d/samba reload return - fi - fi - done + fi + fi + done ;; + remove) i=0 while true do - dev=`uci get samba.@sambashare[$i].device` [ $? -ne 0 ] && break - + [ "$dev" = "$device" ] && { auto=`uci get samba.@sambashare[$i].auto` [ $auto = "1" ] && { diff --git a/package/lean/default-settings/files/zzz-default-settings b/package/lean/default-settings/files/zzz-default-settings index a0f951eb0..96be68ab5 100755 --- a/package/lean/default-settings/files/zzz-default-settings +++ b/package/lean/default-settings/files/zzz-default-settings @@ -29,8 +29,8 @@ sed -i 's/services/nas/g' /usr/lib/lua/luci/view/minidlna_status.htm ln -sf /sbin/ip /usr/bin/ip -#sed -i 's/downloads.openwrt.org/openwrt.proxy.ustclug.org/g' /etc/opkg/distfeeds.conf -#sed -i 's/http/https/g' /etc/opkg/distfeeds.conf +sed -i 's/downloads.openwrt.org/openwrt.proxy.ustclug.org/g' /etc/opkg/distfeeds.conf +sed -i 's/http/https/g' /etc/opkg/distfeeds.conf sed -i 's/root::0:0:99999:7:::/root:$1$V4UetPzk$CYXluq4wUazHjmCDBCqXF.:0:0:99999:7:::/g' /etc/shadow sed -i "s/# //g" /etc/opkg/distfeeds.conf @@ -57,6 +57,3 @@ rm -rf /tmp/luci-modulecache/ rm -f /tmp/luci-indexcache exit 0 - - - diff --git a/package/lean/default-settings/i18n/default.zh-cn.po b/package/lean/default-settings/i18n/default.zh-cn.po index ea500f268..5cf797d2d 100644 --- a/package/lean/default-settings/i18n/default.zh-cn.po +++ b/package/lean/default-settings/i18n/default.zh-cn.po @@ -35,7 +35,7 @@ msgid "ZRam Settings" msgstr "ZRam 设置" msgid "ZRam Compression Algorithm" -msgstr "ZRAM压缩算法" +msgstr "ZRam 压缩算法" msgid "ZRam Compression Streams" msgstr "ZRam 压缩数据流线程数" diff --git a/package/lean/default-settings/i18n/more.zh-cn.po b/package/lean/default-settings/i18n/more.zh-cn.po index c602be14c..404bf6dca 100644 --- a/package/lean/default-settings/i18n/more.zh-cn.po +++ b/package/lean/default-settings/i18n/more.zh-cn.po @@ -1034,4 +1034,3 @@ msgstr "警告:当前系统没有包括两个分区!" msgid "Warning: This system does not support powering off!" msgstr "警告:本系统不支持软关机!" - diff --git a/package/lean/default-settings/i18n/sqm.zh-cn.po b/package/lean/default-settings/i18n/sqm.zh-cn.po index 02a706de5..20cc51c3f 100644 --- a/package/lean/default-settings/i18n/sqm.zh-cn.po +++ b/package/lean/default-settings/i18n/sqm.zh-cn.po @@ -200,4 +200,4 @@ msgstr "最小数据包大小,MPU(byte); 在以太网中需要>0:" #: usr/lib/lua/luci/model/cbi/sqm.lua:242 msgid "Which linklayer adaptation mechanism to use; for testing only" -msgstr "使用哪个链路适应机制; 仅用于测试" \ No newline at end of file +msgstr "使用哪个链路适应机制; 仅用于测试" diff --git a/package/lean/dnsforwarder/files/etc/dnsforwarder/gfw.txt b/package/lean/dnsforwarder/files/etc/dnsforwarder/gfw.txt index 270058ad3..0bd285173 100644 --- a/package/lean/dnsforwarder/files/etc/dnsforwarder/gfw.txt +++ b/package/lean/dnsforwarder/files/etc/dnsforwarder/gfw.txt @@ -4,7 +4,6 @@ server 8.8.8.8,8.8.4.4,1.1.1.1,1.0.0.1,208.67.222.222,208.67.220.220,209.244.0.3 proxy no - 030buy.com 0rz.tw 1-apple.com.tw @@ -4039,6 +4038,8 @@ sendspace.com servehttp.com serveuser.com serveusers.com +services.googleapis.cn +services.googleapis.com sesawe.net sesawe.org sethwklein.net diff --git a/package/lean/dnsforwarder/files/usr/share/dnsforwarder/gfwlist.sh b/package/lean/dnsforwarder/files/usr/share/dnsforwarder/gfwlist.sh index 6b43fda8c..7bcbaec7d 100644 --- a/package/lean/dnsforwarder/files/usr/share/dnsforwarder/gfwlist.sh +++ b/package/lean/dnsforwarder/files/usr/share/dnsforwarder/gfwlist.sh @@ -132,7 +132,7 @@ get_args(){ EXTRA_DOMAIN_FILE="$2" shift ;; - --exclude-domain-file) + --exclude-domain-file) EXCLUDE_DOMAIN_FILE="$2" shift ;; @@ -276,7 +276,7 @@ process(){ if [ $WITH_IPSET -eq 1 ]; then _green 'Ipset rules included.' sort -u $DOMAIN_FILE | $SED_ERES 's#(.+)#server=/\1/'$DNS_IP'\#'$DNS_PORT'\ -ipset=/\1/'$IPSET_NAME'#g' > $CONF_TMP_FILE + ipset=/\1/'$IPSET_NAME'#g' > $CONF_TMP_FILE else _green 'Ipset rules not included.' sort -u $DOMAIN_FILE | $SED_ERES 's#(.+)#server=/\1/'$DNS_IP'\#'$DNS_PORT'#g' > $CONF_TMP_FILE diff --git a/package/lean/ipset-lists/files/etc/gfwlist/china-banned b/package/lean/ipset-lists/files/etc/gfwlist/china-banned index fcc0f577b..8f56a56ed 100644 --- a/package/lean/ipset-lists/files/etc/gfwlist/china-banned +++ b/package/lean/ipset-lists/files/etc/gfwlist/china-banned @@ -3234,6 +3234,9 @@ rapidsharedata.com rapidvpn.com raremovie.cc raremovie.net +raw.githubusercontent.com +rawgit.com +rawgithub.com rayfme.com razyboard.com rcinet.ca @@ -3380,6 +3383,8 @@ sendsmtp.com sendspace.com serveuser.com serveusers.com +services.googleapis.cn +services.googleapis.com sesawe.net sesawe.org sethwklein.net diff --git a/package/lean/ipset-lists/files/etc/init.d/ipset.sh b/package/lean/ipset-lists/files/etc/init.d/ipset.sh index 55f82273b..8af96bf6f 100755 --- a/package/lean/ipset-lists/files/etc/init.d/ipset.sh +++ b/package/lean/ipset-lists/files/etc/init.d/ipset.sh @@ -26,4 +26,3 @@ restart() stop >/dev/null 2>&1 start } - diff --git a/package/lean/ipset-lists/po/zh_CN/gfwlist.po b/package/lean/ipset-lists/po/zh_CN/gfwlist.po index 7ce2c1e8d..5396f6a84 100644 --- a/package/lean/ipset-lists/po/zh_CN/gfwlist.po +++ b/package/lean/ipset-lists/po/zh_CN/gfwlist.po @@ -6,4 +6,3 @@ msgstr "域名列表设置" msgid "Domain Lists" msgstr "域名列表" - diff --git a/package/lean/ipset-lists/tools/base-gfwlist.txt b/package/lean/ipset-lists/tools/base-gfwlist.txt index 75277f6c0..084b4621b 100644 --- a/package/lean/ipset-lists/tools/base-gfwlist.txt +++ b/package/lean/ipset-lists/tools/base-gfwlist.txt @@ -1939,6 +1939,9 @@ ranyunfei.com rapbull.net rapidshare8.com rapidsharedata.com +raw.githubusercontent.com +rawgit.com +rawgithub.com rayfme.com rcinet.ca rconversation.blogs.com @@ -2028,6 +2031,8 @@ seezone.net sejie.com sendoid.com sendspace.com +services.googleapis.cn +services.googleapis.com sesawe.net sesawe.org sethwklein.net diff --git a/package/lean/ipset-lists/tools/gen-china-routes.sh b/package/lean/ipset-lists/tools/gen-china-routes.sh index 632ddcbdf..2a9b05c1a 100755 --- a/package/lean/ipset-lists/tools/gen-china-routes.sh +++ b/package/lean/ipset-lists/tools/gen-china-routes.sh @@ -15,8 +15,8 @@ china_routes_apnic() [ -f apnic.txt ] || wget -4 http://ftp.apnic.net/stats/apnic/delegated-apnic-latest -O apnic.txt >&2 || exit 1 cat apnic.txt | awk -F'|' -vc=CN ' -function tobits(c) { for(n=0; c>=2; c/=2) n++; return 32-n; } -$2==c&&$3=="ipv4" { printf("%s/%d\n", $4, tobits($5)) }' | + function tobits(c) { for(n=0; c>=2; c/=2) n++; return 32-n; } + $2==c&&$3=="ipv4" { printf("%s/%d\n", $4, tobits($5)) }' | xargs netmask | awk '{print $1}' } @@ -42,7 +42,6 @@ convert_routes_to_ipset() awk -vt="$ipset_name" '{ printf("add %s %s\n", t, $0) }' } - generate_china_ipset() { china_routes_merged | convert_routes_to_ipset china @@ -54,16 +53,15 @@ generate_inverted_china_routes() china_routes_merged echo 0.0.0.0/8 10.0.0.0/8 100.64.0.0/10 127.0.0.0/8 172.16.0.0/12 192.168.0.0/16 224.0.0.0/3 ) | - xargs netmask -r | awk '{print $1}' | - awk -F- ' -function iptoint(ip) { split(ip,arr,"."); n=0; for(i=1;i<=4;i++) n=n*256+arr[i]; return n; } -function inttoip(n) { a=int(n/16777216); b=int(n%16777216/65536); c=int(n%65536/256); d=n%256; return a "." b "." c "." d; } -BEGIN { st=0 } -{ x=st; y=iptoint($1); st=iptoint($2)+1; if(y>x) { print inttoip(x) ":" inttoip(y-1); } }' | - xargs netmask | awk '{print $1}' + xargs netmask -r | awk '{print $1}' | + awk -F- ' + function iptoint(ip) { split(ip,arr,"."); n=0; for(i=1;i<=4;i++) n=n*256+arr[i]; return n; } + function inttoip(n) { a=int(n/16777216); b=int(n%16777216/65536); c=int(n%65536/256); d=n%256; return a "." b "." c "." d; } + BEGIN { st=0 } + { x=st; y=iptoint($1); st=iptoint($2)+1; if(y>x) { print inttoip(x) ":" inttoip(y-1); } }' | + xargs netmask | awk '{print $1}' } - ## case "$1" in "") diff --git a/package/lean/ipset-lists/tools/gen-gfwlist.sh b/package/lean/ipset-lists/tools/gen-gfwlist.sh index 74db4205e..1d8068920 100755 --- a/package/lean/ipset-lists/tools/gen-gfwlist.sh +++ b/package/lean/ipset-lists/tools/gen-gfwlist.sh @@ -14,16 +14,14 @@ generate_china_banned() sed '/^[0-9]\+\.[0-9]\+\.[0-9]\+\.[0-9]\+$/d' | grep '^[0-9a-zA-Z\.-]\+$' | grep '\.' | sed 's#^\.\+##' | rev | sort -u | awk ' -BEGIN { prev = "________"; } { - cur = $0; - if (index(cur, prev) == 1 && substr(cur, 1 + length(prev) ,1) == ".") { - } else { - print cur; - prev = cur; - } -}' | rev | sort -u - + BEGIN { prev = "________"; } { + cur = $0; + if (index(cur, prev) == 1 && substr(cur, 1 + length(prev) ,1) == ".") { + } else { + print cur; + prev = cur; + } + }' | rev | sort -u } generate_china_banned - diff --git a/package/lean/ipset-lists/tools/ipv4_merger.c b/package/lean/ipset-lists/tools/ipv4_merger.c index 0af85ced1..76f3ccc6e 100644 --- a/package/lean/ipset-lists/tools/ipv4_merger.c +++ b/package/lean/ipset-lists/tools/ipv4_merger.c @@ -80,19 +80,19 @@ static int ipv4_list_add_range(struct sa_open_data *od, u32 start, { struct ipv4_range *cur; int ret; - + /* Ignore a new range if it or a larger range already exists */ //if (salist_check_ipv4(od->table, start, end)) // return 0; - + if ((ret = __touch_tmp_base(od, gfp)) < 0) return ret; - + /* Check if the size is efficient. Enlarge it if needed. */ if (od->tmp_length + 1 >= od->tmp_size) { size_t old_size = od->tmp_size; struct ipv4_range *old_base = od->tmp_base; - + od->tmp_size *= 2; od->tmp_base = (struct ipv4_range *)realloc(od->tmp_base, sizeof(struct ipv4_range) * od->tmp_size); @@ -102,11 +102,11 @@ static int ipv4_list_add_range(struct sa_open_data *od, u32 start, return -ENOMEM; } } - + cur = &od->tmp_base[od->tmp_length++]; cur->start = start; cur->end = end; - + return 0; } @@ -115,7 +115,7 @@ static inline int ipv4_list_add_netmask(struct sa_open_data *od, { u32 start = net & net_mask; u32 end = net | ~net_mask; - + return ipv4_list_add_range(od, start, end, gfp); } @@ -141,12 +141,12 @@ static int salist_cmd_parse(struct sa_open_data *od, char *cmd, gfp_t gfp) int n = 32; /* Case 3: Append an item */ - + /* Check IP description part: network segment or range? */ if ((sep = strchr(cmd, '/'))) { } else if ((sep = strchr(cmd, '-'))) { } else if ((sep = strchr(cmd, ':'))) { } - + if (sep) { /* Describes a subnet or range. */ sc = *sep; @@ -164,7 +164,7 @@ static int salist_cmd_parse(struct sa_open_data *od, char *cmd, gfp_t gfp) sc = '\0'; a1 = cmd; } - + switch (sc) { case '/': /* 10.10.20.0/24 */ @@ -204,7 +204,7 @@ static int ipv4_range_sort_cmp(const void *a, const void *b) { struct ipv4_range *ra = (struct ipv4_range *)a; struct ipv4_range *rb = (struct ipv4_range *)b; - + if (ra->start > rb->start) { return 1; } else if (ra->start < rb->start) { @@ -269,10 +269,10 @@ static int salist_close(struct sa_open_data *od) od->tmp_base[wi] = od->tmp_base[ri]; } } - + od->tmp_length = wi + 1; } - + /* Reduce the size */ if (od->tmp_length < od->tmp_size) { struct ipv4_range *__tmp = od->tmp_base; @@ -292,7 +292,7 @@ static int salist_close(struct sa_open_data *od) /* Dump the table instead */ } - + if (od->errors) { fprintf(stderr, "[%s] %d errors detected during table operation.\n", __FUNCTION__, od->errors); @@ -336,4 +336,3 @@ int main(int argc, char *argv[]) return 0; } - diff --git a/package/lean/kcptun/Makefile b/package/lean/kcptun/Makefile index f0a1a726e..3ac4db2b7 100644 --- a/package/lean/kcptun/Makefile +++ b/package/lean/kcptun/Makefile @@ -68,4 +68,4 @@ define Package/$(PKG_NAME)/install $(INSTALL_BIN) $(PKG_BUILD_DIR)/client_linux_$(PKG_ARCH_KCPTUN) $(1)/usr/bin/kcptun-client endef -$(eval $(call BuildPackage,$(PKG_NAME))) \ No newline at end of file +$(eval $(call BuildPackage,$(PKG_NAME))) diff --git a/package/lean/luci-app-adbyby-plus/root/usr/share/adbyby/adblack.conf b/package/lean/luci-app-adbyby-plus/root/usr/share/adbyby/adblack.conf index 9b527fbd8..29bbb9452 100644 --- a/package/lean/luci-app-adbyby-plus/root/usr/share/adbyby/adblack.conf +++ b/package/lean/luci-app-adbyby-plus/root/usr/share/adbyby/adblack.conf @@ -43,7 +43,6 @@ sec.resource.xiaomi.net calopenupdate.comm.miui.com hm.xiaomi.com api.device.xiaomi.net -connect.rom.miui.com logupdate.avlyun.sec.miui.com resolver.msg.xiaomi.net api.ra2.xlmc.sec.miui.com