Kernel changes:
- Use nh4 field from struct table_value when we forward IPv4 and tablearg is used.
- Teach "ipfw fwd tablearg" forward IPv6 packets. This is a bit hackish, we still use O_FORWARD_IP opcode for tablearg, but when we are inspecting IPv6 packet, use nh6 and zoneid field from struct table_value to obtain tablearg argument.
I replaced spare1 field to store scope zone id. Now it is possible add link-local IPv6 addresses to tables with valtype ipv6.
- I added sa6_embedscope() call to ipfw_check_packet(). It converts IPv6 LLA into kernel internal form, so in6_localip() will correctly work, and ip6_output() also will do route lookup for correct address.
Userlevel changes:
- I replaced inet_ntop/inet_pton for IPv6 addresses with getaddrinfo/getnameinfo. Now ipfw(8) can correctly add IPv6 LLA with scope zone id to tablearg values.
Also, now it is possible use one ipfw fwd tablearg rule for both IPv4 and IPv6 addresses.