From owner-svn-ports-head@freebsd.org Tue Nov 14 13:21:05 2017 Return-Path: Delivered-To: svn-ports-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 5BFBDDBEAF5; Tue, 14 Nov 2017 13:21:05 +0000 (UTC) (envelope-from ehaupt@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 33C6A7E154; Tue, 14 Nov 2017 13:21:05 +0000 (UTC) (envelope-from ehaupt@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id vAEDL4es046807; Tue, 14 Nov 2017 13:21:04 GMT (envelope-from ehaupt@FreeBSD.org) Received: (from ehaupt@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id vAEDL4Gh046805; Tue, 14 Nov 2017 13:21:04 GMT (envelope-from ehaupt@FreeBSD.org) Message-Id: <201711141321.vAEDL4Gh046805@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ehaupt set sender to ehaupt@FreeBSD.org using -f From: Emanuel Haupt Date: Tue, 14 Nov 2017 13:21:04 +0000 (UTC) To: ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org Subject: svn commit: r454173 - in head/security/vpnc: . files X-SVN-Group: ports-head X-SVN-Commit-Author: ehaupt X-SVN-Commit-Paths: in head/security/vpnc: . files X-SVN-Commit-Revision: 454173 X-SVN-Commit-Repository: ports MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-ports-head@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: SVN commit messages for the ports tree for head List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 14 Nov 2017 13:21:05 -0000 Author: ehaupt Date: Tue Nov 14 13:21:03 2017 New Revision: 454173 URL: https://svnweb.freebsd.org/changeset/ports/454173 Log: Fix an issue where vpnc cannot connect to AVM Fritzbox VPNs because of wrongly reported lifetimes. PR: 223664 Submitted by: stefan.wendler@tngtech.com Modified: head/security/vpnc/Makefile head/security/vpnc/files/patch-vpnc.c Modified: head/security/vpnc/Makefile ============================================================================== --- head/security/vpnc/Makefile Tue Nov 14 12:40:31 2017 (r454172) +++ head/security/vpnc/Makefile Tue Nov 14 13:21:03 2017 (r454173) @@ -3,7 +3,7 @@ PORTNAME= vpnc PORTVERSION= 0.5.3 -PORTREVISION= 12 +PORTREVISION= 13 CATEGORIES= security MASTER_SITES= http://www.unix-ag.uni-kl.de/~massar/vpnc/ \ LOCAL/ehaupt Modified: head/security/vpnc/files/patch-vpnc.c ============================================================================== --- head/security/vpnc/files/patch-vpnc.c Tue Nov 14 12:40:31 2017 (r454172) +++ head/security/vpnc/files/patch-vpnc.c Tue Nov 14 13:21:03 2017 (r454173) @@ -1,6 +1,40 @@ ---- ./vpnc.c.orig 2011-02-25 20:17:00.000000000 +0100 -+++ ./vpnc.c 2011-02-25 20:18:49.000000000 +0100 -@@ -2861,28 +2861,34 @@ +--- vpnc.c.orig 2008-11-19 21:55:51.000000000 +0100 ++++ vpnc.c 2017-11-10 13:09:32.996639000 +0100 +@@ -1160,8 +1160,11 @@ + value = a->next->u.attr_16; + else if (a->next->af == isakmp_attr_lots && a->next->u.lots.length == 4) + value = ntohl(*((uint32_t *) a->next->u.lots.data)); +- else +- assert(0); ++ else { ++ DEBUG(2, printf("got unknown ike lifetime attributes af %d len %d\n", ++ a->next->af, a->next->u.lots.length)); ++ return; ++ } + + DEBUG(2, printf("got ike lifetime attributes: %d %s\n", value, + (a->u.attr_16 == IKE_LIFE_TYPE_SECONDS) ? "seconds" : "kilobyte")); +@@ -1578,6 +1581,19 @@ + seen_natd_them = 1; + } + break; ++ case ISAKMP_PAYLOAD_N: ++ if (rp->u.n.type == ISAKMP_N_IPSEC_RESPONDER_LIFETIME) { ++ if (rp->u.n.protocol == ISAKMP_IPSEC_PROTO_ISAKMP) ++ lifetime_ike_process(s, rp->u.n.attributes); ++ else if (rp->u.n.protocol == ISAKMP_IPSEC_PROTO_IPSEC_ESP) ++ lifetime_ipsec_process(s, rp->u.n.attributes); ++ else ++ DEBUG(2, printf("got unknown lifetime notice, ignoring..\n")); ++ } else { ++ DEBUG(1, printf("rejecting ISAKMP_PAYLOAD_N, type is not lifetime\n")); ++ reject = ISAKMP_N_INVALID_PAYLOAD_TYPE; ++ } ++ break; + default: + DEBUG(1, printf("rejecting invalid payload type %d\n", rp->type)); + reject = ISAKMP_N_INVALID_PAYLOAD_TYPE; +@@ -2861,28 +2877,34 @@ free(dh_shared_secret); free_isakmp_packet(r); @@ -52,7 +86,7 @@ } s->ipsec.rx.seq_id = s->ipsec.tx.seq_id = 1; -@@ -3224,9 +3230,14 @@ +@@ -3224,9 +3246,14 @@ */ /* FIXME: any cleanup needed??? */