Sending packets from within the kernel

From: bp@terran.org
Date: Fri May 04 2001 - 16:09:16 EST


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Hello,

I am working on an kernel module which forwards TCP segments from one
interface to another (basic routing, no proxy or listener socket), but
which needs to be able to generate some segments completely independently
of the client<-->server data stream. For example, when receiving a SYN
segment from the client, I want the module to be able to respond itself
with a SYN+ACK on behalf of the server (and drop the SYN).

I understand how silly this sounds. Setting aside the reasoning and
pitfalls of such a desire, technically what is the best way to do it? I've
reviewed the SYN_COOKIE and RST_COOKIE logic and it seems we must create a
dummy socket which is not attached to any inode.

Is there a cheaper way of accomplishing the same thing, assuming I don't
need to record any state for the endpoints?

Sincerely,
- -bp
- --
# bp at terran dot org
# http://www.terran.org/~bryan

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.0.4 (GNU/Linux)
Comment: For info see http://www.gnupg.org

iD8DBQE68xp/qAGIoYtXZJERAtvDAJ0QCgrfzdoqnRr5hWNpuersTtKpSwCgrtNl
gnGcBjCt+W41tHunmyTuFAM=
=GCRW
-----END PGP SIGNATURE-----

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



This archive was generated by hypermail 2b29 : Mon May 07 2001 - 21:00:20 EST