Page MenuHomeFreeBSD

Update ipfw fwd tablearg
ClosedPublic

Authored by ae on Mar 6 2015, 8:55 AM.
Tags
None
Referenced Files
Unknown Object (File)
Oct 11 2024, 7:18 PM
Unknown Object (File)
Oct 11 2024, 7:18 PM
Unknown Object (File)
Oct 11 2024, 6:58 PM
Unknown Object (File)
Oct 9 2024, 7:16 PM
Unknown Object (File)
Sep 20 2024, 3:19 PM
Unknown Object (File)
Sep 18 2024, 2:31 AM
Unknown Object (File)
Sep 7 2024, 9:44 PM
Unknown Object (File)
Sep 7 2024, 6:04 AM
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.