freebsd-dev/sys/netinet/libalias
Eugene Grosbein 1a356b8b90 ipfw nat and natd support multiple aliasing instances with "nat global" feature
that chooses right alias_address for outgoing packets that already have
corresponding state in one of aliasing instances. This feature works just fine
for ICMP, UDP, TCP and SCTP packes but not for others. For example,
outgoing PPtP/GRE packets always get alias_address of latest configured
instance no matter whether such packets have corresponding state or not.

This change unbreaks translation of transit PPtP/GRE connections
for "nat global" case fixing a bug in static ProtoAliasOut() function
that ignores its "create" argument and performs translation
regardless of its value. This static function is called only
by LibAliasOutLocked() function and only for packers other than
ICMP, UDP, TCP and SCTP. LibAliasOutLocked() passes its "create"
argument unmodified.

We have only two consumers of LibAliasOutLocked() in the source tree
calling it with "create" unequal to 1: "ipfw nat global" code and similar
natd code having same problem. All other consumers of LibAliasOutLocked()
call it with create = 1 and the patch is "no-op" for such cases.

PR:		218968
Approved by:	ae, vsevolod (mentor)
MFC after:	1 week
2017-05-10 19:41:52 +00:00
..
alias_cuseeme.c
alias_db.c
alias_dummy.c
alias_ftp.c
alias_irc.c
alias_local.h Use inet_ntoa_r() instead of inet_ntoa() throughout the kernel 2017-02-16 20:47:41 +00:00
alias_mod.c
alias_mod.h
alias_nbt.c Use inet_ntoa_r() instead of inet_ntoa() throughout the kernel 2017-02-16 20:47:41 +00:00
alias_pptp.c
alias_proxy.c alias_proxy.c: Fix accidental error quashing 2017-03-13 18:05:31 +00:00
alias_sctp.c Use inet_ntoa_r() instead of inet_ntoa() throughout the kernel 2017-02-16 20:47:41 +00:00
alias_sctp.h
alias_skinny.c
alias_smedia.c
alias_util.c
alias.c ipfw nat and natd support multiple aliasing instances with "nat global" feature 2017-05-10 19:41:52 +00:00
alias.h
HISTORY
libalias.3