Search code examples
linuxlinux-kernelnetwork-programmingtrafficshaping

How to filter packets marked by 'so_mark' using TC


I use so_mark to mark packets sent from a specific socket.
Now I want to filter these packets from a class in my TC (from HTB mechanism actually).
What is the filter to be used (and syntax example will be helpful as well)


Solution

  • If anyone wondered :

    tc filter add dev eth0 parent 1:0 prio 1 u32 match mark 0x123 0xFFF flowid 1:1