linux/net/l2tp
David S. Miller 2d7192d6cb ipv4: Sanitize and simplify ip_route_{connect,newports}()
These functions are used together as a unit for route resolution
during connect().  They address the chicken-and-egg problem that
exists when ports need to be allocated during connect() processing,
yet such port allocations require addressing information from the
routing code.

It's currently more heavy handed than it needs to be, and in
particular we allocate and initialize a flow object twice.

Let the callers provide the on-stack flow object.  That way we only
need to initialize it once in the ip_route_connect() call.

Later, if ip_route_newports() needs to do anything, it re-uses that
flow object as-is except for the ports which it updates before the
route re-lookup.

Also, describe why this set of facilities are needed and how it works
in a big comment.

Signed-off-by: David S. Miller <davem@davemloft.net>
Reviewed-by: Eric Dumazet <eric.dumazet@gmail.com>
2011-04-27 13:59:04 -07:00
..
Kconfig l2tp: Add debugfs files for dumping l2tp debug info 2010-04-03 14:56:07 -07:00
Makefile l2tp: Add debugfs files for dumping l2tp debug info 2010-04-03 14:56:07 -07:00
l2tp_core.c l2tp: static functions should not be exported 2010-10-24 22:26:41 -07:00
l2tp_core.h l2tp: make local function static 2010-10-24 14:55:47 -07:00
l2tp_debugfs.c l2tp: kzalloc with swapped params in l2tp_dfs_seq_open 2010-11-01 06:56:02 -07:00
l2tp_eth.c l2tp: fix possible oops on l2tp_eth module unload 2011-03-21 18:10:25 -07:00
l2tp_ip.c ipv4: Sanitize and simplify ip_route_{connect,newports}() 2011-04-27 13:59:04 -07:00
l2tp_netlink.c l2tp: Fix set-but-unused variables. 2011-04-17 17:01:05 -07:00
l2tp_ppp.c net: constify some ppp/pptp structs 2010-09-21 18:04:47 -07:00