Merge patch adding support for ipv6 from Pawel Dabrowski <ving@student.uci.agh.edu.pl>

Add masq support for FreeBSD.
