CVSROOT: /cvs Module name: src Changes by: clau...@cvs.openbsd.org 2009/11/03 03:59:04
Modified files: sbin/pfctl : pf_print_state.c pfctl.h sys/net : if.c if_atmsubr.c if_ethersubr.c if_fddisubr.c if_pfsync.c if_pfsync.h if_ppp.c if_sl.c if_spppsubr.c pf.c pf_ioctl.c pf_lb.c pfvar.h route.c route.h rtsock.c sys/netinet : if_ether.c in.c in_pcb.c in_var.h ip_icmp.c ip_input.c ip_ipip.c ip_output.c raw_ip.c tcp_input.c tcp_subr.c udp_usrreq.c sys/netinet6 : ip6_forward.c ip6_input.c sys/sys : mbuf.h usr.sbin/tcpdump: pf_print_state.c Log message: rtables are stacked on rdomains (it is possible to have multiple routing tables on top of a rdomain) but until now our code was a crazy mix so that it was impossible to correctly use rtables in that case. Additionally pf(4) only knows about rtables and not about rdomains. This is especially bad when tracking (possibly conflicting) states in various domains. This diff fixes all or most of these issues. It adds a lookup function to get the rdomain id based on a rtable id. Makes pf understand rdomains and allows pf to move packets between rdomains (it is similar to NAT). Because pf states now track the rdomain id as well it is necessary to modify the pfsync wire format. So old and new systems will not sync up. A lot of help by dlg@, tested by sthen@, jsg@ and probably more OK dlg@, mpf@, deraadt@