History log of /freebsd-10.1-release/sys/netgraph/ng_nat.c
Revision Date Author Comments
(<<< Hide modified files)
(Show modified files >>>)
# 272461 02-Oct-2014 gjb

Copy stable/10@r272459 to releng/10.1 as part of
the 10.1-RELEASE process.

Approved by: re (implicit)
Sponsored by: The FreeBSD Foundation

# 256281 10-Oct-2013 gjb

Copy head (r256279) to stable/10 as part of the 10.0-RELEASE cycle.

Approved by: re (implicit)
Sponsored by: The FreeBSD Foundation


# 248570 21-Mar-2013 glebius

Add NGM_NAT_LIBALIAS_INFO command, that reports internal stats
of libalias instance. To be used in the mpd5 daemon.

Submitted by: Dmitry Luhtionov <dmitryluhtionov gmail.com>


# 241344 08-Oct-2012 glebius

After r241245 it appeared that in_delayed_cksum(), which still expects
host byte order, was sometimes called with net byte order. Since we are
moving towards net byte order throughout the stack, the function was
converted to expect net byte order, and its consumers fixed appropriately:
- ip_output(), ipfilter(4) not changed, since already call
in_delayed_cksum() with header in net byte order.
- divert(4), ng_nat(4), ipfw_nat(4) now don't need to swap byte order
there and back.
- mrouting code and IPv6 ipsec now need to switch byte order there and
back, but I hope, this is temporary solution.
- In ipsec(4) shifted switch to net byte order prior to in_delayed_cksum().
- pf_route() catches up on r241245 changes to ip_output().


# 222808 07-Jun-2011 ae

Sync ng_nat with recent (r222806) ipfw_nat changes:

Make a behaviour of the libalias based in-kernel NAT a bit closer to
how natd(8) does work. natd(8) drops packets only when libalias returns
PKT_ALIAS_IGNORED and "deny_incoming" option is set, but ipfw_nat
always did drop packets that were not aliased, even if they should
not be aliased and just are going through.

Also add SCTP support: mark response packets to skip firewall processing.

MFC after: 1 month


# 220800 18-Apr-2011 glebius

LibAliasInit() should allocate memory with M_WAITOK flag. Modify it
and its callers.


# 220768 18-Apr-2011 glebius

Node constructor methods are supposed to be called in syscall
context always. Convert nodes to consistently use M_WAITOK flag
for memory allocation.

Reviewed by: julian


# 184205 23-Oct-2008 des

Retire the MALLOC and FREE macros. They are an abomination unto style(9).

MFC after: 3 months


# 179477 01-Jun-2008 mav

Pass really available buffer size to libalias instead of MCLBYTES constant.
MCLBYTES constant were used with believe that m_megapullup() always moves
date into a fresh cluster that may become not so.


# 176706 01-Mar-2008 mav

Add support for the libalias redirect functionality.

Submitted by: Vadim Goncharov <vadim_nuclight@mail.ru>


# 169867 22-May-2007 mav

Add support for setmode and settarget messages.

Approved by: glebius (mentor)


# 169866 22-May-2007 mav

Allow node to bypass traffic while no alias address defined.

Approved by: glebius (mentor)


# 165435 21-Dec-2006 glebius

Return value PKT_ALIAS_FOUND_HEADER_FRAGMENT isn't an error case. The
packet shouldn't be dropped.

Submitted by: Alexander Motin <mav alkar.net>


# 165119 12-Dec-2006 glebius

Correctly calculate length of IP header.

Submitted by: Eugene Hartmann <eugene tpsb.com.ru>


# 164797 01-Dec-2006 piso

Remove m_megapullup from ng_nat and put it under libalias.

Approved by: gleb


# 163297 13-Oct-2006 glebius

Fix result of some mechanical change that I did some time ago, when
writing this node.


# 147625 27-Jun-2005 glebius

- After LibAlias processing check for TCP packet with th_x2 field
set. If found, then recalculate its checksum.
- Remove debugging printfs.
- Slightly rearrange code in ng_nat_rcvdata().

Approved by: re (scottl)


# 146084 11-May-2005 glebius

Move assertion below initializer.

Submitted by: Noritoshi Demizu
Pointy hat to: glebius


# 146063 10-May-2005 glebius

- Assert that mbuf length equals packet length.
- Tell libalias, that we have MCLBYTES to play with.
- Obtain length of data in mbuf from updated IP header.


# 145937 05-May-2005 glebius

ng_nat - a netgraph(4) node, which does NAT