Page MenuHomeFreeBSD

LibAlias: implement RFC 4787 REQ 1 and 3 (full cone NAT)
Needs ReviewPublic

Authored by damjan.jov_gmail.com on Tue, Sep 17, 6:44 PM.
Referenced Files
F96352227: D46689.id.diff
Tue, Sep 24, 4:34 PM
Unknown Object (File)
Mon, Sep 23, 11:20 AM
Unknown Object (File)
Sat, Sep 21, 10:07 PM
Unknown Object (File)
Fri, Sep 20, 2:02 AM
Unknown Object (File)
Thu, Sep 19, 5:40 PM
Unknown Object (File)
Wed, Sep 18, 7:01 PM
Unknown Object (File)
Wed, Sep 18, 12:40 PM

Details

Reviewers
thj
donner
glebius
Summary

Make libalias's NAT use endpoint-independent mapping ("full cone NAT") for UDP, conforming to RFC 4787 requirements 1 and 3. All UDP packets sent out from a particular internal address:port leave via the same NAT address:port, regardless of their destination.

Also add some libalias tests, and fix other tests that broke.

Closes: https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=219918

Test Plan

Tests are included in the patch.

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Skipped
Unit
Tests Skipped

Event Timeline

damjan.jov_gmail.com created this object with edit policy "Subscribers".

So far this generally looks ok to me and the tests seem to work.

I think this NAT behaviour should be optional in the same way we made it a configuration option for pf.

I would like someone more familiar with libalias to weigh in, in case there is something I am missing.

sys/netinet/libalias/alias_db.c
242

Can you split this so the line is shorter

tests/sys/netinet/libalias/2_natout.c
388

Can you split this so the line is shorter

I really don't remember much of libalias internals. Trusting your expertise, Tom! Thanks, Damjan!