Skip to contentSkip to conversation

Avoid adding fw filter using mark

LARTC Sumit Pandya 2 participants 2 messages Sep 20, 2002

lore
Share & tools
lore
#0 lore raw

Hi Devik,

Quoted 5 lines

I'm happy that HTB gained so much popularity ;) Only one hint for you - you can completely avoid all these tc filter add .... fw ...
You can use only one
tc filter add dev ppp0 parent 1: protocol ip prio 1 handle 1 fw

When I add above rule I get an error message "RTNETLINK answers: Invalid
argument"
but I can see above filter inserted with command:

	# /sbin/tc -s -d -r filter show dev ppp0
	output: filter parent 1: protocol ip pref 1 fw
	Even if that message comming My all rules and policy works fine :-) Can I
neglect error message occurs at time of adding filter?
Quoted 10 lines

and set classid directly in iptables like:
iptables -t mangle -A to-dsl -p tcp --dport 80 -j MARK --set-mark 0x10010 iptables -t mangle -A to-dsl -p tcp --sport 24 -j MARK --set-mark 0x10020

and so on ..
devik

On 17 Apr 2002, alex wrote:

Quoted 8 lines
Quoted 5 lines
    /sbin/iptables -t mangle -A to-dsl -p tcp --dport 22   -j MARK

--set-mark 1

And handle 11:111 ?

would become --set-mark 0x00110111...
or 0x110111 Last 4 digits (16bits) is class, firct 16bit is qdisc.

-- Sumit

_______________________________________________
LARTC mailing list / [email protected]
http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/

#1 lore raw
Quoted 8 lines · Sumit Pandya

Hi Devik,

Quoted 5 lines

I'm happy that HTB gained so much popularity ;) Only one hint for you - you can completely avoid all these tc filter add .... fw ...
You can use only one
tc filter add dev ppp0 parent 1: protocol ip prio 1 handle 1 fw

Quoted 7 lines

When I add above rule I get an error message "RTNETLINK answers: Invalid
argument"
but I can see above filter inserted with command:

	# /sbin/tc -s -d -r filter show dev ppp0
	output: filter parent 1: protocol ip pref 1 fw
	Even if that message comming My all rules and policy works fine :-) Can I
neglect error message occurs at time of adding filter?

If it works, yes ;)

Stef

Signature · 8 lines
[email protected]
 "Using Linux as bandwidth manager"
     http://www.docum.org/
     #lartc @ irc.oftc.net

_______________________________________________
LARTC mailing list / [email protected]
http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/