Page MenuHomeFreeBSD

Add ability to use dynamic external prefix in ipfw_nptv6 module
ClosedPublic

Authored by ae on Oct 30 2018, 7:50 PM.
Tags
None
Referenced Files
Unknown Object (File)
Thu, Apr 25, 4:55 PM
Unknown Object (File)
Tue, Apr 23, 9:32 PM
Unknown Object (File)
Wed, Apr 10, 12:48 AM
Unknown Object (File)
Mar 22 2024, 8:11 AM
Unknown Object (File)
Feb 8 2024, 11:20 PM
Unknown Object (File)
Feb 2 2024, 10:21 PM
Unknown Object (File)
Jan 11 2024, 9:52 PM
Unknown Object (File)
Dec 20 2023, 4:35 AM
Subscribers

Details

Summary

The idea is to have ability to specify interface name that will obtain IPv6 prefix dynamically instead of using ext_prefix argument.

  • to ipfw(8) added ability to use ext_if ifname argument
  • to keep ABI the struct _ipfw_nptv6_cfg was modified using anonymous union. The size of if_name is the same as in6_addr.
  • added ifaddr_event_ext handler and the code modified to be able use specified if_name to obtain external prefix.

The nptv6 instance will handle ifaddr events and take suitable address as external prefix. When address disappears, or interface has not suitable address, instance silently skips handling of matched packets. So, they probably will be routed untranslated.

Diff Detail

Lint
Lint Passed
Unit
No Test Coverage
Build Status
Buildable 20517
Build 19945: arc lint + arc unit

Event Timeline

0mp added a subscriber: 0mp.

The manpage change looks fine. Remember to bump the date :)

This revision is now accepted and ready to land.Oct 30 2018, 8:25 PM

Hi, I tested this code and it works like a charm! Thanks! Now I can have a static addresses config for jails with a dynamic external prefix.
I needed this because my ISP uses DHCPv6 to delegate prefixes which can change, so a static NPTv6 rule in IPFW was a nono.

I guess this wont be MFC'able to STABLE12 as it uses the other patch in D17100? Or maybe this breaks ABI, anyway thanks for doing this!

This revision was automatically updated to reflect the committed changes.