CVSROOT: /cvs Module name: src Changes by: r...@cvs.openbsd.org 2010/06/30 20:09:45
Modified files: sys/net : if_bridge.c if_enc.c if_enc.h pfkeyv2.c pfkeyv2.h pfkeyv2_convert.c pfkeyv2_parsemessage.c route.c sys/netinet : ip_ah.c ip_esp.c ip_ipcomp.c ip_ipsp.h ip_output.c ipsec_input.c sys/netinet6 : ip6_forward.c ip6_output.c Log message: Allow to specify an alternative enc(4) interface for an SA. All traffic for this SA will appear on the specified enc interface instead of enc0 and can be filtered and monitored separately. This will allow to group individual ipsec policies to virtual interfaces and simplifies monitoring and pf filtering with many ipsec policies a lot. This diff includes the following changes: - Store the enc interface unit (default 0) in the TDB of an SA and pass it to the enc_getif() lookup when running the bpf or pf_test() handlers. - Add the pfkey SADB_X_EXT_TAP extension to communicate the encX interface unit for a specified SA between userland and kernel. - Update enc(4) again to use an allocate array instead of the TAILQ to lookup the matching enc interface in enc_getif() quickly. Discussed with many, tested by a few, will need more testing & review. ok deraadt@