more on pfil and bridging



The more I look at this the more I think that it is broken.

Instead of the bridge registering a separate filter queue for itself,
it is using the queues set up by the IP stack.

It should register its own stack and each filter type should
register their own filter functions for that level on the stack.

is there a reason that this is not done? If the answer is simply
ENOTIME then I will volunteer to go through it and do it properly.

suggested changes:

I propose to create filter queues for if_ethersubr.c and if_bridge.c
distinguished by slightly different keys. I also propose to rename
inet_pfil_hook to be inet_pfil_head (or inet_pfil_hooks).

I would also look at following the documentation by seeing whether
we shouldn't be using a DLT/KEY instead of PFIL_AF and AF_INET
as the key type/key.

The Direction argument should be expanded to be a generic 'flags'
argument where two of the flags are direction.
Other flags can be:
WAIT_OK: (It's already defined to be there)
HOST_ORDER: Fields in the header have been swapped to host order.

The ipfw code would supply different entry points for bridge
and Ethernet supplied packets.

the ipfw args struct should grow a 'flags' field that can
indicate (for example) that the IP header fields have not been
put in host order (or have) and that the packet is from a bridge
rather than just being layer2.

ipfw would grow a 'bridge' keyword to check that flag.




Julian

_______________________________________________
freebsd-net@xxxxxxxxxxx mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-net
To unsubscribe, send any mail to "freebsd-net-unsubscribe@xxxxxxxxxxx"



Relevant Pages

  • Re: PCI device problem - MMCONFIG, cannot allocate resource region, resource collisions
    ... BIOS might be buggy btw, or you're somehow running out of space), search for the title "PCI bridge range sizing bug". ... Flags: bus master, 66MHz, medium devsel, latency 0 ... Micro-Star International Co., Ltd. Unknown device 7244 ...
    (Linux-Kernel)
  • ELECTION 2008: Pas seizes Marang bridge in flag war
    ... Pas supporters have claimed the Marang bridge, ... guard posts to prevent anyone from putting up flags on or even near the bridge. ... every four years," said Mahathir Daud, 38, a BN supporter in Wakaf Mempelam. ...
    (soc.culture.malaysia)
  • Re: [RFC&PATCH 1/2] PCI Error Recovery (readX_check)
    ... This document describes about the implementation and usage of driver APIs ... Generally, system has multiple PCI buses, every bus could have multiple ... Often host bus bridge(Host-to-PCI bridge, connecting PCI system to the host) ... and bridge has 2 sets of status register for both of its neighbor buses. ...
    (Linux-Kernel)
  • Re: more on pfil and bridging
    ... Instead of the bridge registering a separate filter queue for itself, ... bridged packets as "normal" L2 packets. ...
    (freebsd-net)
  • Re: [PATCH] Document Linuxs memory barriers [try #2]
    ... On Wednesday, March 8, 2006 4:37 pm, Paul Mackerras wrote: ... Looks like there's a register in the local I/O hub that lets you ... appropriate PCI host bridge? ...
    (Linux-Kernel)