From my Raspberry Pi configured as an access point, I set the following rules:
sudo iptables -I FORWARD -p tcp --sport 25 -j NFQUEUE --queue-num 0
sudo iptables -I FORWARD -p tcp --sport 80 -j NFQUEUE --queue-num 1
sudo iptables -I FORWARD -p udp --sport 5060 -j NFQUEUE --queue-num 2
sudo iptables -I FORWARD -p tcp --sport 5060 -j NFQUEUE --queue-num 2
My purpose is to forward packets coming from port 5060 before packets from port 80 and way before packets from port 25 (a rude Quality of Service implementation where I'm trying to give the highest priority to "Skype packets" (from 5060), medium priority to "HTTP packets" (port 80) and low priority to "SMTP packets" (port 25)).
I'm using libnetfilter_queue library: how can I use nfq_set_verdict to delay a low priority packet?
NF_QUEUE inject the packet into a different queue (the target queue number is in the high 16 bits of the verdict) but don't continue iterations
NF_REPEAT iterate the same cycle once more
Maybe I don't get something about the two flags above: how can I use them in order to put a low priority packet in delay?