Skip to contentSkip to conversation

ip_queue_vwmark for pom-ng

PATCH Applied Eric Leblond 2 participants 5 messages Jun 10, 2004 – Jun 13, 2004 netfilter

lore
Share & tools
lore
#0 lore raw

Hi everyone,

I finally found the time to port my ip_queue_vwmark patch to pom-ng. I join a patch to this mail.
Little reminder :
ip_queue_vwmark adds a function to libipq (ipq_set_vwmark for ipq_set_verdict_with_mark) that permits to put a mark on the packet when reinjecting it into the kernel.

It is used by the Nufw project (http://www.nufw.org) to mark packet with user identity thus enabling a per-user QOS.

BR,

Signature · 2 lines
Eric Leblond <[email protected]>
INL
ip_queue_vwmark/help +12 -0
diff -uNr patch-o-matic-ng-20040302/ip_queue_vwmark/help patch-o-matic-ng-20040302.new/ip_queue_vwmark/help
@@ -0,0 +1,12 @@
+
+Adds the possibility to change mark of a packet in userspace.
+The ip_queue module is changed and a new function is added to 
+libipq to decide and change the mark of a packet. 
+
+This is used by the NuFW project (http://www.nufw.org).
+
+***** WARNING ***** 
+This patch breaks compatibility with the preceding version of libipq
+and ip_queue module.
+This patch also patch the userspace directory which means that you
+you have to recompile and reinstall the iptables package after that.
ip_queue_vwmark/info +5 -0
diff -uNr patch-o-matic-ng-20040302/ip_queue_vwmark/info patch-o-matic-ng-20040302.new/ip_queue_vwmark/info
@@ -0,0 +1,5 @@
+Title: Add a function to libipq to put a mark on paquet from userspace
+Author: Eric Leblond <[email protected]>
+Status: It Works For Me.
+Repository: extra
+Recompile: netfilter|iptables
ip_queue_vwmark/iptables.patch +76 -0

76 lines not on this page · raw message

ip_queue_vwmark/linux.patch +85 -0

85 lines not on this page · raw message

#1 lore raw
Quoted 8 lines · Eric Leblond

Hi everyone,

I finally found the time to port my ip_queue_vwmark patch to pom-ng. I join a patch to this mail.
Little reminder :
ip_queue_vwmark adds a function to libipq (ipq_set_vwmark for ipq_set_verdict_with_mark) that permits to put a mark on the packet when reinjecting it into the kernel.

Applied, thanks Eric. Am I right that this patch doesn't break userspace compatiblity ?

Regards
Patrick

Quoted 5 lines

It is used by the Nufw project (http://www.nufw.org) to mark packet with user identity thus enabling a per-user QOS.

BR,

#2 lore raw
Quoted 3 lines · Patrick McHardy

On Thu, 2004-06-10 at 23:31, Eric Leblond wrote:
Applied, thanks Eric. Am I right that this patch doesn't break userspace compatiblity ?

I add to change the definition of a structure related to libipq. So it can break compatibility of application using the size of this structure.

But It should not impact libipq applications.

Regards

Signature · 2 lines
Eric Leblond <[email protected]>
INL
#3 lore raw
Quoted 8 lines · Eric Leblond
Quoted 3 lines · Patrick McHardy

On Thu, 2004-06-10 at 23:31, Eric Leblond wrote:
Applied, thanks Eric. Am I right that this patch doesn't break userspace compatiblity ?

I add to change the definition of a structure related to libipq. So it can break compatibility of application using the size of this structure.

The kernel itself verifies the size of the structure when receiving messages from userspace. I missed that you enlarged the structure. Since it breaks compatibility with old binaries anyway, why didn't you just add the mark to ipq_verdict_msg instead of duplicating it and adding ipq_set_vwmark, which is 99% equal to ipq_set_verdict?

Regards
Patrick

Quoted 4 lines

But It should not impact libipq applications.

Regards

#4 lore raw
Quoted 6 lines · Patrick McHardy
Quoted 2 lines · Eric Leblond

On Sun, 2004-06-13 at 22:11, Patrick McHardy wrote:

why didn't you just
add the mark to ipq_verdict_msg instead of duplicating it and adding ipq_set_vwmark, which is 99% equal to ipq_set_verdict?

It's clearky the way to do. At the time I wrote the patch (last year), I did'nt know it will break compatibility by changing libipq structure, so I prefer to add another struct.

I resend a patch following your idea in the next days.

BR,

Signature · 2 lines
Eric Leblond <[email protected]>
INL