This replaces the existing data structures storing forwarding information, with new ones that can store more detailed and flexible information, Eventually we plan to allow dynamically updating this as well. Patches 1, 2 & 8 could be merged (1 & 2 are the same as the the earlier series with cleanups to the listening socket init functions). The rest are just for early review. Since I'm going to be away for the next two weeks, no rush at all. v2: * Remove preliminary patches already merged * Add several patches actually using the new data structure David Gibson (12): tcp: Combine tcp_sock_init_one() and tcp_sock_init() into tcp_listen() udp: Rename udp_sock_init() to udp_listen() with small cleanups conf, fwd: Keep a table of our port forwarding configuration conf: Accurately record ifname and address for outbound forwards conf, fwd: Record "auto" port forwards in forwarding table tcp, udp: Make {tcp,udp}_listen() return socket fds fwd: Make space to store listening sockets in forward table ip: Add ipproto_name() function fwd, tcp, udp: Set up listening sockets based on forward table tcp, udp: Remove old auto-forwarding socket arrays fwd: Generate auto-forward exclusions from socket fd tables tcp: Remove unused tcp_epoll_ref conf.c | 125 +++++++++++++++++--------- fwd.c | 273 +++++++++++++++++++++++++++++++++++++++++++++++++++++++-- fwd.h | 49 ++++++++++- ip.c | 26 ++++++ ip.h | 2 + tcp.c | 190 +++------------------------------------ tcp.h | 17 +--- udp.c | 140 ++--------------------------- udp.h | 8 +- 9 files changed, 447 insertions(+), 383 deletions(-) -- 2.52.0