Bug 217131 - [patch] security/ipsec-tools add patch for better NAT-T support
Summary: [patch] security/ipsec-tools add patch for better NAT-T support
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Only Me
Assignee: VANHULLEBUS Yvan
URL:
Keywords: patch
Depends on:
Blocks:
 
Reported: 2017-02-16 10:31 UTC by Andrey V. Elsukov
Modified: 2017-04-18 14:40 UTC (History)
3 users (show)

See Also:
eugen: maintainer-feedback-


Attachments
patch (6.34 KB, patch)
2017-02-16 10:31 UTC, Andrey V. Elsukov
no flags Details | Diff
patch (6.34 KB, patch)
2017-02-18 16:05 UTC, Andrey V. Elsukov
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Andrey V. Elsukov freebsd_committer freebsd_triage 2017-02-16 10:31:08 UTC
Created attachment 180038 [details]
patch

This patch adds NATT_EXTRA_PATCHES=natt.diff and enables only UDP encapsulation defined in RFC3948.

The natt.diff patch contains the following changes:
* added support for SADB_X_EXT_NAT_T_OAI and SADB_X_EXT_NAT_T_OAR PF_KEY messages;
* used NAT address instead of original for SAs created by racoon;
* NAT-T keep-alives now sends only by NATed host.

Several people reported that now they are able to use NAT-T in transport mode with IPsec from projects/ipsec. However I did not tested how it affects IPsec implementation from stable/9,10,11. From quick look it should not affect something that worked earlier.
Comment 1 Andrey V. Elsukov freebsd_committer freebsd_triage 2017-02-18 16:05:07 UTC
Created attachment 180110 [details]
patch

Fix bug in one chunk. OAi/OAr addresses should be reversed, because they present peer's view of addresses.
Comment 2 Eugene Grosbein 2017-03-11 11:05:04 UTC
I've tested this path with new kernel IPSEC code committed to head by Andrey and it just works.

Please commit the patch.
Comment 3 commit-hook freebsd_committer freebsd_triage 2017-04-18 14:36:28 UTC
A commit references this bug:

Author: eugen
Date: Tue Apr 18 14:36:08 UTC 2017
New revision: 438782
URL: https://svnweb.freebsd.org/changeset/ports/438782

Log:
  This patch adds NATT_EXTRA_PATCHES=natt.diff and enables only UDP encapsulation defined in RFC3948.

  The natt.diff patch contains the following changes:
  * added support for SADB_X_EXT_NAT_T_OAI and SADB_X_EXT_NAT_T_OAR PF_KEY messages;
  * used NAT address instead of original for SAs created by racoon;
  * NAT-T keep-alives now sends only by NATed host.

  Tested with 11.0-STABLE after projects/ipsec merge.

  PR:		217131
  Submitted by:	Andrey V. Elsukov
  Approved by:	VANHULLEBUS Yvan (maintainer timeout, 2 months), vsevolod (mentor)

Changes:
  head/security/ipsec-tools/Makefile
  head/security/ipsec-tools/files/natt.diff