mirror of
https://github.com/Telecominfraproject/wlan-ap.git
synced 2025-11-01 02:48:18 +00:00
switch-fabric: fix port mirroring
Signed-off-by: John Crispin <john@phrozen.org>
This commit is contained in:
@@ -3,20 +3,17 @@
|
||||
. /lib/functions.sh
|
||||
|
||||
port_mirror() {
|
||||
for lan in $(ls -d /sys/class/net/lan* | cut -dn -f3 |sort -n); do
|
||||
tc qdisc del dev lan$lan clsact
|
||||
done
|
||||
|
||||
monitor=$(uci get switch.mirror.monitor)
|
||||
analysis=$(uci get switch.mirror.analysis)
|
||||
|
||||
[ -n "$monitor" -a -n "$analysis" ] || return
|
||||
tc qdisc del dev $analysis clsact
|
||||
|
||||
ifconfig $analysis up
|
||||
for port in $monitor; do
|
||||
tc qdisc del dev $port clsact
|
||||
tc qdisc add dev $port clsact
|
||||
tc filter add dev $port ingress matchall skip_sw action mirred egress mirror dev $analysis
|
||||
tc filter add dev $port egress matchall skip_sw action mirred egress mirror dev $analysis
|
||||
tc filter add dev $port ingress matchall action mirred egress mirror dev $analysis
|
||||
tc filter add dev $port egress matchall action mirred egress mirror dev $analysis
|
||||
done
|
||||
}
|
||||
|
||||
|
||||
@@ -4,10 +4,10 @@ PKG_NAME:=ucentral-schema
|
||||
PKG_RELEASE:=1
|
||||
|
||||
PKG_SOURCE_URL=https://github.com/Telecominfraproject/wlan-ucentral-schema.git
|
||||
PKG_MIRROR_HASH:=73e2292f3dceb41baf26b48d1cb75f7b61523e1c585a67afef7f8a3519d4efb4
|
||||
PKG_MIRROR_HASH:=a7ccdac8d75d42e8a18cfb19f6b27ebec6b698c5852272956bdf619222f94915
|
||||
PKG_SOURCE_PROTO:=git
|
||||
PKG_SOURCE_DATE:=2022-05-29
|
||||
PKG_SOURCE_VERSION:=b287fee80fcf707de77ae69c1dcc47c78bf6270b
|
||||
PKG_SOURCE_VERSION:=5b534e489f92d6f44ffbf2cdc154a7eccb2b67fc
|
||||
PKG_MAINTAINER:=John Crispin <john@phrozen.org>
|
||||
PKG_LICENSE:=BSD-3-Clause
|
||||
|
||||
|
||||
@@ -3,8 +3,8 @@
|
||||
|
||||
"switch": {
|
||||
"port-mirror": {
|
||||
"monitor-ports": [ "WAN2" ],
|
||||
"analysis-port": "WAN3"
|
||||
"monitor-ports": [ "WAN" ],
|
||||
"analysis-port": "LAN1"
|
||||
}
|
||||
},
|
||||
|
||||
|
||||
@@ -31,6 +31,7 @@ packages:
|
||||
- lldpd
|
||||
- uspot
|
||||
- spotfilter
|
||||
- switch-fabric
|
||||
- radius-gw-proxy
|
||||
- radsecproxy
|
||||
- ratelimit
|
||||
|
||||
Reference in New Issue
Block a user