Skip to contentSkip to conversation

Problems matching tos on port 554

LARTC Bolivar Diaz Galarza 1 participant 1 message Jan 30, 2007

lore
Share & tools
lore
#0 lore raw

Hi There,

I am trying to match mac address and tos at the same time. It mostly works for all ports, but recently I discovered that it doesn't, for example it does not work on port 554.

For each client I have two classes, one is the "good" traffic that I mark using iptables with the line, for example:

/sbin/iptables -t mangle -A PREROUTING -p tcp --sport 554 -j TOS --set-tos 0x10

Later on, I use tc filter to send the packets marked with tos 0x10 to the proper class which will be 1:1192 in this case, and the rest of the traffic matching that clients MAC address continues to 1:2192:

BAJADA="/sbin/tc filter add dev eth1 protocol ip parent 1:0 prio 1 u32 match u16 0x0800 0xffff at -2"
$BAJADA match u32 0x5bb517c8 0xffffffff at -12 match u16 0x0011 0xffff at -14 match ip tos 0x10 0xff flowid 1:1192
$BAJADA match u32 0x5bb517c8 0xffffffff at -12 match u16 0x0011 0xffff at -14 flowid 1:2192

I thought about marking the packets with iptables -j MARK --set-mark but I can't find a way of making this work and matching the MAC address at the same time.

Any help will be greatly appreciated.

Bolivar,

_______________________________________________
LARTC mailing list
[email protected]
http://mailman.ds9a.nl/cgi-bin/mailman/listinfo/lartc