|
This patch by FreeBSD's Poul-Henning Kamp makes it possible for programs like natd to run multiple packet-aliasing engines, this was not previously possible because of the widespread use of global variables in libalias.
http://phk.freebsd.dk/patch/libalias.patch
This patch makes it possible to have multiple packet aliasing
instances in a single process.
Redefine a new API based on s/PacketAlias/LibAlias/g
Add new "instance" argument to all functions in the new API.
Put all global variables in the instance structure.
Implement old API in terms of the new API.
No functional change.
No functions removed so there is no need for shlib version bump,
only an updating entry and a __FreeBSD_version bump.
The intent is to subsequently add a "multilink" facility to natd(8)
for people with two xDSL lines to different providers etc.
For this we need to run one packet-aliasing engine per line, and
in order to not totally toast throughput, this should not result
in more context switches then we are used to. (ie: not
kern/usr/kern/usr/kern for the second line, but just kern/usr/kern
as always).
This patch makes it possible for programs like natd to run multiple
packet-aliasing engines, this was not previously possible because
of the widespread use of global variables in libalias. |
|