Bug 197835 - [patch] security/vpnc 0.5.3_10 cannot sendto() esp packets on 11-CURRENT
Summary: [patch] security/vpnc 0.5.3_10 cannot sendto() esp packets on 11-CURRENT
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: amd64 Any
: --- Affects Only Me
Assignee: Emanuel Haupt
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-02-19 22:00 UTC by markiyan.kushnir
Modified: 2015-03-03 20:51 UTC (History)
2 users (show)

See Also:


Attachments
my version of the patch (924 bytes, patch)
2015-02-19 22:00 UTC, markiyan.kushnir
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description markiyan.kushnir 2015-02-19 22:00:52 UTC
Created attachment 153197 [details]
my version of the patch

Once vpnc set up a tunnel and went into the main loop, no esp could be sent, with the following error message:

vpnc[2405]: esp sendto: Invalid argument

A strange thing is that vpnc seems to work OK on a bhyve guest built around the same time, as my host system:

$ uname -a
FreeBSD mkushnir.mooo.com 11.0-CURRENT FreeBSD 11.0-CURRENT #0 r278973: Thu Feb 19 05:56:13 EET 2015     root@vm0.mkushnir.mooo.com:/work/obj/work/src.svn/sys/MAREK  amd64

After some digging, I could fix it by defining NEED_IPLEN_FIX in the port patch file. I'm attaching my version of patch-sysdep.h below.

I found it quite a while ago (a couple of months), but only got to it now.
Comment 1 Mark Linimon freebsd_committer freebsd_triage 2015-02-19 23:54:16 UTC
Fix Summary and assign.
Comment 2 Emanuel Haupt freebsd_committer freebsd_triage 2015-02-21 08:52:47 UTC
Can you narrow this this down to a specific __FreeBSD_version?

https://www.freebsd.org/doc/en_US.ISO8859-1/books/porters-handbook/versions.html

I feel reluctant to implement this patch on a global scope.
Comment 3 markiyan.kushnir 2015-02-21 22:22:44 UTC
I haven't seen it in 10-STABLE (on my laptop in the office). And barely recall it started to be an issue on my home setup since November or so. Where I run 11-CURRENT with periodically source-upgrading it. I would suggest __FreeBSD_version >= 1100000.
Comment 4 markiyan.kushnir 2015-02-21 22:27:05 UTC
(In reply to markiyan.kushnir from comment #3)
well, not 1100000, sorry. So let it be

 __FreeBSD_version >= 1100042

which corresponds to the last Nov.
Comment 5 Johannes Jost Meixner freebsd_committer freebsd_triage 2015-03-03 17:27:08 UTC
(In reply to Emanuel Haupt from comment #2)

Patch attached fixes the bug on 1100059.

FreeBSD mx12.chaot.net 11.0-CURRENT FreeBSD 11.0-CURRENT #0 r278452: Mon Feb  9 13:40:37 UTC 2015     root@releng2.nyi.freebsd.org:/usr/obj/usr/src/sys/GENERIC  amd64
Comment 6 commit-hook freebsd_committer freebsd_triage 2015-03-03 20:51:10 UTC
A commit references this bug:

Author: ehaupt
Date: Tue Mar  3 20:50:54 UTC 2015
New revision: 380395
URL: https://svnweb.freebsd.org/changeset/ports/380395

Log:
  Fix bug on __FreeBSD_version >= 1100042 where once vpnc set up a tunnel and
  went into the main loop, no esp could be sent.

  PR:             197835 (based on)
  Submitted by:   markiyan.kushnir@gmail.com
  Fix confirmed:  xmj

Changes:
  head/security/vpnc/Makefile
  head/security/vpnc/files/patch-sysdep.h
Comment 7 Emanuel Haupt freebsd_committer freebsd_triage 2015-03-03 20:51:48 UTC
Patch committed, thanks.