Re: [PATCH] 2.2.10: 2-dir masquerading for single-interface port forwarding

Juanjo Ciarlante (irriga@impsat1.com.ar)
Wed, 30 Jun 1999 15:01:32 -0300


--rwEMma7ioTxnRzrJ
Content-Type: text/plain; charset=us-ascii

On Tue, Jun 29, 1999 at 12:52:01PM -0400, Rolf Braun wrote:
> This patch adds a 2-dir (bidirectional) masquerading feature to the kernel
> so that connections can be set up directly through the kernel in which
> neither side sees the real IP of the other side. The intention of this
> patch is to provide a way to cleanly forward connections over a single
> interface using the accompanying masq_mbfw module, which is mfw modified
> to use the new code.
I'm currently digging your code, some remarks:
* The idea is good and doable.
* We should impact ip_masq input path very low, because IS the
common path taken by every input packet.
* Please #ifdef CONFIG_IP_MASQ_BIDI (or similar) for easier inclusion
(there are MANY core changes)
* Could you adapt your changes to patch below?

BTW I'm attaching a patch that provides
* double linked lists => fast deletion, neater code
Currently it depends on list "load" and MUST be fast
because it's called from timer.
* dest+source hashing by Julian Anastasov, improves port forwarding
Currently portfw a-like hashing uses just masq port: same hash=> long list.
* additional daddr-only hash (used by eg. John Hardin's masq VPN module)

Alan, Dave could you inject attached patch? (tested Ok under heavy load)

Thanks

-- 
-- Juanjo       http://juanjox.kernelnotes.org/
            ... because there IS an OS that CAN follow your power 

--rwEMma7ioTxnRzrJ Content-Type: application/x-gunzip Content-Disposition: attachment; filename="ip_masq-2link-v4-2.2.9.patch.gz" Content-Transfer-Encoding: base64

H4sIAGCSZzcAA9Vbe1fjRrL/23yKCjfDsbEMkmywseO5IcAsJLwWM3dnNzfREVYbK8iSo5Zg 5iazn32rqluWLNvAkJnsXp8ZW4+qftTjV1XdzVp/7rN2b27Zu9CANYDGfasLw7Eb3goPmptu Ek38oeOHw2oNGq9B37ueh/cGRMlYxHDvy9QNNJfERviTNbLeXCfOk0vnbH/wV+f8ev+706MB d9Xswsh/jzRpOHbl2A9voRqL0TBMagYMozgWwwTf+lNnMnrAQfgJ9jqNoyRKPkwFN2F3wQ78 8A7JAl8mcm3tx/OLazg5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yy6aDMEHOGTojJXCxuUdyUpGTbWvzK82OlIi1ibuH86No5uTwb /PV4cG0AJmOzvSblbuhYq4/58Tmo7KzfIA3hAvuCFtDhSKvb2qGjcZ1Hzvpp/vLpSKuLCc/s wF8T/RLdg34sHcQXF4N6z/ZaZQt0enjegdXNxL3FJFqfAXtqaWlZlqqGvENQUm/u7GWIstz9 UQlyGmO/oyqN2+B8bP0SYwcM4uHJJQ1+cImB9VAm6u6Q7s72CW/xc0Z3AzpJlk31TYDof0VW kgTqFLWQUB3FQlAuzv9qepHj8/dzfBU9wPEBRr3FHiFf8uASJbMAIuRyTNYMeAZV3XomnZ0B fLNtUdHWbDcz5KDS6xQxFHwJ7jBJsUD5gLEMv0JBf+RCUe19QifIpqCoHwQfLC+WMurvC7ow ocOWMkHSm/HWbAWRFsjYqJ7A8P8IBMfB1uu9Fy5gz2U7X/VVFZ+BODkSer5Q2bVSxx6H2+Ze e/aXIdhv0e1wCAvFbJi9zDv+ap5JJ14ZGZSbbFi8ATjnb+uvGi1J64EBLwK+W3XZsGwka+JV y8Nf/N8OUuVGn689ddPytLMUDvbyYfminGuKJM9oOFtDx8gzXLUHW6bzFug8TcdHJkyLD1eb u/qPVop126ILF1cZsjEXZK7QrJrXu6q+lY1f/NHIF7K2ffwPXRw+TqTgCk2a/hJNGwBlB5hF ZNKnP1gScR2fYvwi8bYl5YQcDfSSDNpMlbhe9wnxb5Mx2ei/ABzzEg9/NwAA

--rwEMma7ioTxnRzrJ--

- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.rutgers.edu Please read the FAQ at http://www.tux.org/lkml/