Skip to contentSkip to conversation

Making ip_queue l3 independent

DISCUSSION Harald Welte 2 participants 4 messages Aug 23, 2003 – Aug 24, 2003 netfilter

lore
Share & tools
lore
#0 lore raw

Hi James!

At the netfilter summit [*] the issue of ip_queue being l3 dependent was raised. As other layer3 protocols (like ipv6, mpls, the bridging code) want to queue packets to userspace as well, it is questionable if the current approach of ip_queue / ip6_queue is the right way to go for the future.

As of now, every l3 protocol can register a queue handler with the netfilter core. I think we should keep this behaviour - so other queue handlers can attach like they currently do.

But what about turning ip_queue.c into something more general (like nf_queue.c) that can attach as queue handler with any l3 protocol the user wants?

Enqueuing the packet inside the kernel, transporting the packet from kernel to userspace and back is not something related to a specific layer 3 networking protocol.

AFAICT even the ipq_packet_msg_t could stay the same - so no big compatibility issues with userspace are to be expected. One might however consider adding a 'proto' member to indicate from which l3prot the packet came from.

In any case, if we were to make a change, it should happen before 2.6.0-final is released.

James, what is your take on this? What do you think? If you agree, do you have the time to do the change, or would you be fine if I'd work out a patch?

[*] I'll try to post a short summary about the netfilter workshop tomorrow

Signature · 5 lines
- Harald Welte <[email protected]>             http://www.netfilter.org/
============================================================================
  "Fragmentation is like classful addressing -- an interesting early
   architectural error that shows how much experimentation was going
   on while IP was being designed."                    -- Paul Vixie
#1 lore raw
Quoted 3 lines · Harald Welte

James, what is your take on this? What do you think? If you agree, do you have the time to do the change, or would you be fine if I'd work out a patch?

Yes it's a good idea. Most of the code is indeed protocol independent, and things like the mangle function could be registerable as part of e.g. nf_queue_handler_ops.

It is unlikely that I would have time to work on this before 2.6.0, due to other projects and the fact that I'm moving to the US in a few weeks.

Please feel free to hack on the code. Another potentially useful improvement would be to allow for multiple packet messages and verdicts, which I don't think would be difficult to implement (using the same or similar technique in your ulogd code).

It would be nice to maintain binary compatibility with current libipq, if possible.

- James

Signature · 2 lines
James Morris
<[email protected]>
#2 lore raw
Quoted 9 lines · James Morris
Quoted 3 lines · Harald Welte

James, what is your take on this? What do you think? If you agree, do you have the time to do the change, or would you be fine if I'd work out a patch?

Yes it's a good idea. Most of the code is indeed protocol independent, and things like the mangle function could be registerable as part of e.g. nf_queue_handler_ops.

that was what I've been thinking about.

Quoted 2 lines

It is unlikely that I would have time to work on this before 2.6.0, due to other projects and the fact that I'm moving to the US in a few weeks.

ok. I think I can spend some time on implementing the change.

Quoted 4 lines

Please feel free to hack on the code. Another potentially useful improvement would be to allow for multiple packet messages and verdicts, which I don't think would be difficult to implement (using the same or similar technique in your ulogd code).

Well, I think this can be added later on, as it doesn't really change anything.

Quoted 2 lines

It would be nice to maintain binary compatibility with current libipq, if possible.

Are you talking about userspace API compatibility to libipq, or binary compatiblity on the netlink socket?

Quoted 1 line

- James

Signature · 5 lines
- Harald Welte <[email protected]>             http://www.netfilter.org/
============================================================================
  "Fragmentation is like classful addressing -- an interesting early
   architectural error that shows how much experimentation was going
   on while IP was being designed."                    -- Paul Vixie
#3 lore raw
Quoted 5 lines · Harald Welte
Quoted 2 lines

It would be nice to maintain binary compatibility with current libipq, if possible.

Are you talking about userspace API compatibility to libipq, or binary compatiblity on the netlink socket?

Well, libipq is only provided as a static library currently, so the apps will need to be relinked if the netlink binary API changes.

- James

Signature · 2 lines
James Morris
<[email protected]>