MAP-E (RFC 7597) transports IPv4 packets across an IPv6 network using IP encapsulation. MAP-E uses a single IPv4 address for multiple customers. To distinguish customers at Border Relay, each Customer Edge must use an exclusive port set.
This patch provides an option map-e-portset
in pf(4) to specify the port set used in MAP-E Customer Edge. The following pf.conf(5) example sets PSID offset to 4, PSID length to 6, and PSID to 20:
match out on $gif_if nat-to ($gif_if) map-e-portset 4/6/20
Note that, to work as a MAP-E Customer Edge, creating and configuring a tunneling gif(4) interface are also required.
To apply this patch, you need to build OpenBSD from source.
Follow the instructions in Building OpenBSD from Source (www.openbsd.org) and before building a new kernel, apply the path as follows.
cd /usr/src/
patch -p0 < /path/to/mape.patch
After applying the patch, continue to follow the above instructions.
- OpenBSD 7.0 or later