git: ipfw3nat: nat func to replace the src or dst

Bill Yuan bycn82 at crater.dragonflybsd.org
Mon Apr 9 06:52:25 PDT 2018


commit 29f13cb6490754babc4058fa2e432c23471f53a9
Author: Bill Yuan <bycn82 at dragonflybsd.org>
Date:   Mon Apr 9 13:02:55 2018 +0000

    ipfw3nat: nat func to replace the src or dst
    
    The `src` will be replaced by `alias` when a packet is leaving the system.
    Hence, the packet is from `src` to `dst` before been translated. And after
    been translated, the packet is from `alias` to `dst`.
    
    The state for outgoing packet will be stored in the nat_context of current
    CPU. But due to the nature of the NAT, the returning packet may be handled
    by another CPU. Hence, a state for the returning packet will be prepared and
    store into the nat_context of the right CPU.

Summary of changes:
 sys/net/ipfw3_nat/ip_fw3_nat.c | 242 ++++++++++++++++++++++++++++++++++++++++-
 1 file changed, 240 insertions(+), 2 deletions(-)

http://gitweb.dragonflybsd.org/dragonfly.git/commitdiff/29f13cb6490754babc4058fa2e432c23471f53a9


-- 
DragonFly BSD source repository


More information about the Commits mailing list