Page MenuHomeFreeBSD

Update ipfw fwd tablearg
ClosedPublic

Authored by ae on Mar 6 2015, 8:55 AM.
Tags
None
Referenced Files
Unknown Object (File)
Tue, Jun 25, 6:48 AM
Unknown Object (File)
May 24 2024, 10:29 AM
Unknown Object (File)
May 23 2024, 11:10 AM
Unknown Object (File)
May 23 2024, 8:44 AM
Unknown Object (File)
May 2 2024, 8:26 PM
Unknown Object (File)
May 2 2024, 8:25 PM
Unknown Object (File)
Apr 5 2024, 7:35 PM
Unknown Object (File)
Mar 5 2024, 11:17 PM
Subscribers

Details

Reviewers
melifaro
ae
bz
Summary

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.

Diff Detail

Repository
rS FreeBSD src repository - subversion
Lint
No Lint Coverage
Unit
No Test Coverage

Event Timeline

ae retitled this revision from to Update ipfw fwd tablearg.
ae updated this object.
ae edited the test plan for this revision. (Show Details)
ae added reviewers: melifaro, bz.
ae added a reviewer: ae.
This revision is now accepted and ready to land.Mar 13 2015, 9:13 AM

Committed in r279948.