Subject: [alpine-devel] Suggesting patch for ipsec-tools

From: "Mika Havela" <[email-masked]>
Date: Mon, 27 Jul 2009 08:46:44 +0000

I am in need of adding the '-k' option to setkey.
Had it working before (my init.d script was modified) but I accidently lost it at previous upgrade.
With this patch I wouldn't have same problem. I could add my setkey options to conf.d/racoon and wouldn't need to touch the init.d/racoon script.

From 1f417d770db532822f03ff751168003de4c69552 Mon Sep 17 00:00:00 2001
From: Mika Havela <[email-masked]>
Date: Mon, 27 Jul 2009 08:37:46 +0000
Subject: [PATCH] Adding SETKEY_OPTS parameter to init.d and conf.d files
 This helps users to append e.g. '-k' option to the setkey command by modifying their /etc/conf.d/racoon file

---
 main/ipsec-tools/racoon.confd |    1 +
 main/ipsec-tools/racoon.initd |    2 +-
 2 files changed, 2 insertions(+), 1 deletions(-)

diff --git a/main/ipsec-tools/racoon.confd b/main/ipsec-tools/racoon.confd
index 66f8ed7..bf9926c 100644
--- a/main/ipsec-tools/racoon.confd
+++ b/main/ipsec-tools/racoon.confd
@@ -8,6 +8,7 @@
 # for valid command-line options
 
 RACOON_OPTS="-4"
+SETKEY_OPTS=""
 
 RACOON_CONF="/etc/racoon/racoon.conf"
 RACOON_PSK_FILE="/etc/racoon/psk.txt"
diff --git a/main/ipsec-tools/racoon.initd b/main/ipsec-tools/racoon.initd
index 16fdec7..0ed4efe 100644
--- a/main/ipsec-tools/racoon.initd
+++ b/main/ipsec-tools/racoon.initd
@@ -36,7 +36,7 @@ checkconfig() {
 start() {
 	checkconfig || return 1
 	einfo "Loading ipsec policies from ${SETKEY_CONF}."
-	/usr/sbin/setkey -f ${SETKEY_CONF}
+	/usr/sbin/setkey ${SETKEY_OPTS} -f ${SETKEY_CONF}
 	if [ $? -eq 1 ] ; then
 		eerror "Error while loading ipsec policies"
 	fi
-- 
1.6.2.5

---

From: Mika Havela <[email-masked]>
Date: Wed, 5 Aug 2009 15:47:30 +0200

Was this a bad idea?
<<mhavela>>

---

 RACOON_OPTS="-4"
+SETKEY_OPTS=""

---

From: Natanael Copa <[email-masked]>
Date: Wed, 05 Aug 2009 16:02:55 +0200

On Wed, 2009-08-05 at 15:47 +0200, Mika Havela wrote:
On Mon, Jul 27, 2009 at 10:46 AM, Mika Havela<[email-masked]>
wrote:
> > With this patch I wouldn't have same problem. I could add my setkey
> options to conf.d/racoon and wouldn't need to touch the init.d/racoon
> script.
> 
> Was this a bad idea?

no. I just forgot it. sorry.

-nc

---
Unsubscribe:  [email-masked]
Help:         [email-masked]
---

---

From: Natanael Copa <[email-masked]>
Date: Wed, 05 Aug 2009 16:32:52 +0200

> options to conf.d/racoon and wouldn't need to touch the init.d/racoon

Finally i look at this. sorry for the delay.

In addition to chagne the default config and init.d script you should
have bumped pkgrel and done 'abuild checksum' since the checksum changed
for the files.

I did this and commited.

Thanks!

-nc

---

---

From: Mika Havela <[email-masked]>
Date: Wed, 05 Aug 2009 16:33:07 +0200

> have bumped pkgrel and done 'abuild checksum' since the checksum changed

Thanks for the help.
Sorry for the extra work. I try to keep it in mind.
<<mhavela>>

---