freebsd-skq/sbin/ipfw
Andrey V. Elsukov 2530ed9e70 Fix `ipfw fwd tablearg'. Use dedicated field nh4 in struct table_value
to obtain IPv4 next hop address in tablearg case.

Add `fwd tablearg' support for IPv6. ipfw(8) uses INADDR_ANY as next hop
address in O_FORWARD_IP opcode for specifying tablearg case. For IPv6 we
still use this opcode, but when packet identified as IPv6 packet, we
obtain next hop address from dedicated field nh6 in struct table_value.

Replace hopstore field in struct ip_fw_args with anonymous union and add
hopstore6 field. Use this field to copy tablearg value for IPv6.

Replace spare1 field in struct table_value with zoneid. Use it to keep
scope zone id for link-local IPv6 addresses. Since spare1 was used
internally, replace spare0 array with two variables spare0 and spare1.

Use getaddrinfo(3)/getnameinfo(3) functions for parsing and formatting
IPv6 addresses in table_value. Use zoneid field in struct table_value
to store sin6_scope_id value.

Since the kernel still uses embedded scope zone id to represent
link-local addresses, convert next_hop6 address into this form before
return from pfil processing. This also fixes in6_localip() check
for link-local addresses.

Differential Revision:	https://reviews.freebsd.org/D2015
Obtained from:	Yandex LLC
Sponsored by:	Yandex LLC
2015-03-13 09:03:25 +00:00
..
altq.c Merge buffer-printing changes from from projects/ipfw as preparation 2014-08-23 17:37:18 +00:00
dummynet.c Merge buffer-printing changes from from projects/ipfw as preparation 2014-08-23 17:37:18 +00:00
ipfw2.c Retrieve counters from kernel if rule timstamping is requested. 2015-02-05 14:08:33 +00:00
ipfw2.h Add support for multi-field values inside ipfw tables. 2014-08-31 23:51:09 +00:00
ipfw.8 Fix `ipfw fwd tablearg'. Use dedicated field nh4 in struct table_value 2015-03-13 09:03:25 +00:00
ipv6.c Merge buffer-printing changes from from projects/ipfw as preparation 2014-08-23 17:37:18 +00:00
main.c * Move "talist" and "iflist" cmds into newly-create "internal" ipfw(8) cmd. 2014-08-03 16:22:14 +00:00
Makefile Convert sbin/ to LIBADD 2014-11-25 11:23:12 +00:00
nat.c natd(8) will work with an unconfigured interface and effectively not do 2015-01-25 20:37:32 +00:00
tables.c Fix `ipfw fwd tablearg'. Use dedicated field nh4 in struct table_value 2015-03-13 09:03:25 +00:00