tc del class not working

Linux Advanced Routing and Traffic Control

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



When I start my script:

*   - Creating classes on br1 for upload control ...
 *     - tc class add dev br1 parent 2:0 classid 2:46  hfsc ls m1
576.0Kbit d 2000ms m2 192.0Kbit ul m2 384Kbit ...
[ ok ]
 *     - tc class add dev br1 parent 2:46 classid 2:47 hfsc sc umax
1500b dmax 30ms rate 80Kbit .  [ ok ]
 *     - tc class add dev br1 parent 2:46 classid 2:48 hfsc ls m2
152.0Kbit ul m2 152.0Kbit ...    [ ok ]
 *     - tc class add dev br1 parent 2:46 classid 2:49 hfsc rt m2
76.00Kbit ls m2 152.0Kbit ul m2 304Kbit
 ...
[ ok ]
 *   - Creating classes on wivl4 for download control ...
 *     - tc class add dev wivl4 parent 5:0 classid 5:46 hfsc ls m1
1536.0Kbit d 2000ms m2 256.00Kbit ul m2 1024Kbit ...
[ ok ]
 *     - tc class add dev wivl4 parent 5:46 classid 5:47 hfsc sc umax
1500b dmax 30ms rate 80Kbit  [ ok ]
 *     - tc class add dev wivl4 parent 5:46 classid 5:48 hfsc ls m2
472.0Kbit ul m2 472.0Kbit ...  [ ok ]
 *     - tc class add dev wivl4 parent 5:46 classid 5:49 hfsc rt m2
236.00Kbit ls m2 472.0Kbit ul m2 944Kbit ...
[ ok ]
 *   - Adding rules to classify traffic for 00:05:9e:80:e1:3b ...
 *     - iptables -A macfilter -m mac --mac-source 00:05:9e:80:e1:3b ...
[ ok ]
 *     - iptables -A macfilter_nat -t nat -m mac --mac-source
00:05:9e:80:e1:3b ...                [ ok ]
 *   - Adding rules to flag VoIP traffic ...
 *     - iptables -A PREROUTING -t mangle -p udp -m mac --mac-source
00:05:9e:80:e1:3b -m multiport --ports 53,4569,5060,10000:20000 -j MARK
--set-mark 47 ...                                              [ ok ]
 *     - iptables -A PREROUTING -t mangle -p tcp -m mac --mac-source
00:05:9e:80:e1:3b -m multiport --ports 22,23,53 -j MARK --set-mark 47
...                                                              [ ok ]
 *     - iptables -A PREROUTING -t mangle -p icmp -m mac --mac-source
00:05:9e:80:e1:3b -j MARK --set-mark 47 ...
[ ok ]
 *     - iptables -A PREROUTING -t mangle -m mark --mark 47 -j CONNMARK
--save-mark ...            [ ok ]
 *   - Adding rules to flag P2P traffic ...
 *     - iptables -A PREROUTING -t mangle -m mac --mac-source
00:05:9e:80:e1:3b -m ipp2p --ipp2p -j MARK
--set-mark 48 ...
[ ok ]
 *     - iptables -A PREROUTING -t mangle -m mark --mark 48 -j CONNMARK
--save-mark ...            [ ok ]
 *   - Adding rules to flag General traffic ...
 *     - iptables -A PREROUTING -t mangle -m mac --mac-source
00:05:9e:80:e1:3b -j MARK --set-mar  [ ok ]
 *     - iptables -A PREROUTING -t mangle -m mark --mark 49 -j CONNMARK
--save-mark ...            [ ok ]
 *   - Adding rules to classify traffic on br1 ...
 *     - iptables -A POSTROUTING -t mangle -o br1 -m mark --mark 47 -j
CLASSIFY --set-class 2:47   [ ok ]
 *     - iptables -A POSTROUTING -t mangle -o br1 -m mark --mark 48 -j
CLASSIFY --set-class 2:48   [ ok ]
 *     - iptables -A POSTROUTING -t mangle -o br1 -m mark --mark 49 -j
CLASSIFY --set-class 2:49   [ ok ]
 *   - Adding rules to classify traffic on wivl4 ...
 *     - iptables -A POSTROUTING -t mangle -o wivl4 -m mark --mark 47 -j
CLASSIFY --set-class 5:47  [ ok ]
 *     - iptables -A POSTROUTING -t mangle -o wivl4 -m mark --mark 48 -j
CLASSIFY --set-class 5:48  [ ok ]
 *     - iptables -A POSTROUTING -t mangle -o wivl4 -m mark --mark 49 -j
CLASSIFY --set-class 5:49  [ ok ]





It is all added correctly. Now, I stop the traffic shaping:




*     - iptables -D macfilter -m mac --mac-source 00:05:9e:80:e1:3b ...
[ ok ]
 *     - iptables -D macfilter_nat -t nat -m mac --mac-source
00:05:9e:80:e1:3b ...                [ ok ]
 *   - Deleting rules to flag VoIP traffic ...
 *     - iptables -D PREROUTING -t mangle -p udp -m mac --mac-source
00:05:9e:80:e1:3b -m multiport --ports 53,4569,5060,10000:20000 -j MARK
--set-mark 47 ...                                              [ ok ]
 *     - iptables -D PREROUTING -t mangle -p tcp -m mac --mac-source
00:05:9e:80:e1:3b -m multiport --ports 22,23,53 -j MARK --set-mark 47
...                                                              [ ok ]
 *     - iptables -D PREROUTING -t mangle -p icmp -m mac --mac-source
00:05:9e:80:e1:3b -j MARK --set-mark 47 ...
[ ok ]
 *     - iptables -D PREROUTING -t mangle -m mark --mark 47 -j CONNMARK
--save-mark ...            [ ok ]
 *   - Deleting rules to flag P2P traffic ...
 *     - iptables -D PREROUTING -t mangle -m mac --mac-source
00:05:9e:80:e1:3b -m ipp2p --ipp2p -j MARK
--set-mark 48 ...
[ ok ]
 *     - iptables -D PREROUTING -t mangle -m mark --mark 48 -j CONNMARK
--save-mark ...            [ ok ]
 *   - Deleting rules to flag General traffic ...
 *     - iptables -D PREROUTING -t mangle -m mac --mac-source
00:05:9e:80:e1:3b -j MARK --set-mar  [ ok ]
 *     - iptables -D PREROUTING -t mangle -m mark --mark 49 -j CONNMARK
--save-mark ...            [ ok ]
 *   - Deleting rules to classify traffic on br1 ...
 *     - iptables -D POSTROUTING -t mangle -o br1 -m mark --mark 47 -j
CLASSIFY --set-class 2:47   [ ok ]
 *     - iptables -D POSTROUTING -t mangle -o br1 -m mark --mark 48 -j
CLASSIFY --set-class 2:48   [ ok ]
 *     - iptables -D POSTROUTING -t mangle -o br1 -m mark --mark 49 -j
CLASSIFY --set-class 2:49   [ ok ]
 *   - Deleting rules to classify traffic on wivl4 ...
 *     - iptables -D POSTROUTING -t mangle -o wivl4 -m mark --mark 47 -j
CLASSIFY --set-class 5:47  [ ok ]
 *     - iptables -D POSTROUTING -t mangle -o wivl4 -m mark --mark 48 -j
CLASSIFY --set-class 5:48  [ ok ]
 *     - iptables -D POSTROUTING -t mangle -o wivl4 -m mark --mark 49 -j
CLASSIFY --set-class 5:49  [ ok ]
 * Deleting bandwidth management for gsoule ...
 *   - Deleting classes on br1 for upload control ...
 *     - tc class del dev br1 parent 2:46 classid 2:47 hfsc sc umax
1500b dmax 30ms rate 80Kbit .  [ ok ]
 *     - tc class del dev br1 parent 2:46 classid 2:48 hfsc ls m2
152.0Kbit ul m2 152.0Kbit ...    [ ok ]
 *     - tc class del dev br1 parent 2:46 classid 2:49 hfsc rt m2
76.00Kbit ls m2 152.0Kbit ul m2 304Kbit
 ...
[ ok ]
 *     - tc class del dev br1 parent 2:0 classid 2:46  hfsc ls m1
576.0Kbit d 2000ms m2 192.0Kbit ul m2 384Kbit ...
 * >>>>> RTNETLINK answers: Device or resource busy
[ !! ]
 *   - Deleting classes on wivl4 for download control ...
 *     - tc class del dev wivl4 parent 5:46 classid 5:47 hfsc sc umax
1500b dmax 30ms rate 80Kbit  [ ok ]
 *     - tc class del dev wivl4 parent 5:46 classid 5:48 hfsc ls m2
472.0Kbit ul m2 472.0Kbit ...  [ ok ]
 *     - tc class del dev wivl4 parent 5:46 classid 5:49 hfsc rt m2
236.00Kbit ls m2 472.0Kbit ul m2 944Kbit ...
[ ok ]
 *     - tc class del dev eth1 parent 5:0 classid 5:46 hfsc ls m1
1536.0Kbit d 2000ms m2 256.00Kbit ul m2
 1024Kbit ...
 * >>>>> RTNETLINK answers: No such file or directory
[ !! ]


Those two rules do not get removed. I do not understand why they are
failing. The del rules are exactly the same as the add rules, except
they say del instead of add. I can clear the rules by deleting the root
qdiscs on the interface, but that removes all rules for the entire
interface, which is not the desired operation. 

Also, a quick test by hand shows that it is only from having a child
class assigned to it that it becomes un-deletable. 

This works fine:

wireless-r1 raddb # tc class add dev wivl4 parent 5:0 classid 5:56 hfsc
ls m1 1536.0Kbit d 2000ms m2 256.00Kbit ul m2 1024Kbit

wireless-r1 raddb # tc class del dev wivl4 parent 5:0 classid 5:56 hfsc
ls m1 1536.0Kbit d 2000ms m2 256.00Kbit ul m2 1024Kbit


This does not:

wireless-r1 raddb # tc class add dev wivl4 parent 5:0 classid 5:56 hfsc
ls m1 1536.0Kbit d 2000ms m2 256.00Kbit ul m2 1024Kbit

wireless-r1 raddb # tc class add dev wivl4 parent 5:56 classid 5:57 hfsc
sc umax 1500b dmax 30ms rate 80Kbit

wireless-r1 raddb # tc class del dev wivl4 parent 5:56 classid 5:57 hfsc
sc umax 1500b dmax 30ms rate 80Kbit

wireless-r1 raddb # tc class del dev wivl4 parent 5:0 classid 5:56 hfsc
ls m1 1536.0Kbit d 2000ms m2 256.00Kbit ul m2 1024Kbit
RTNETLINK answers: Device or resource busy


I have looked everywhere trying to figure this out. Does anyone have any
ideas?

Thanks.
 
Eliot Gable
Certified Wireless Network Administrator (CWNA)
Certified Wireless Security Professional (CWSP)
Cisco Certified Network Associate (CCNA)
CompTIA Security+ Certified
CompTIA Network+ Certified
Network and Systems Administrator
Great Lakes Internet, Inc.
112 North Howard
Croswell, MI 48422
(810) 679-3395
(877) 558-8324
 
Now offering Broadband Wireless Internet access in Croswell, Lexington,
Brown City, Yale, and Sandusky. Call for details.

_______________________________________________
LARTC mailing list
LARTC@xxxxxxxxxxxxxxx
http://mailman.ds9a.nl/cgi-bin/mailman/listinfo/lartc


[Index of Archives]     [LARTC Home Page]     [Netfilter]     [Netfilter Development]     [Network Development]     [Bugtraq]     [GCC Help]     [Yosemite News]     [Linux Kernel]     [Fedora Users]
  Powered by Linux