Hello community, here is the log from the commit of package openswan checked in at Fri Mar 23 22:33:10 CET 2007. -------- --- openswan/openswan.changes 2007-01-20 14:06:08.000000000 +0100 +++ /mounts/work_src_done/STABLE/openswan/openswan.changes 2007-03-23 13:50:24.000000000 +0100 @@ -1,0 +2,22 @@ +Fri Mar 23 13:50:14 CET 2007 - mt@suse.de + +- Bug #234042: Changed back internal nhelpers option default to + use number of CPU-1 crypto worker. Added fallback to perform + inline calculations in main process, when all worker are busy. + Obsolete patch file: openswan_16_nhelpers_default.dif + New patch file name: openswan_16_crypto_inline_fallback.dif + +------------------------------------------------------------------- +Fri Mar 16 19:58:00 CET 2007 - mt@suse.de + +- Bug #234042: Applied proposed patch fixing bogus crypto helper + management code. The number of crypto helpers (nhelpers option) + has to be set at least to number of tunnels/2 + 1 to take effect. + New patch file: openswan_15_crypto_helper_fix.dif +- Bug #234042: Applied fix to display correct crypto helper number + in debug output of the pluto_do_crypto_op function. Changed the + default of the nhelpers option to 0 (instead of number of CPU-1). + This disables the crypto helpers by default (inline calculation). + New patch file: openswan_16_nhelpers_default.dif + +------------------------------------------------------------------- New: ---- openswan_15_crypto_helper_fix.dif openswan_16_crypto_inline_fallback.dif ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ openswan.spec ++++++ --- /var/tmp/diff_new_pack.ji4394/_old 2007-03-23 22:29:38.000000000 +0100 +++ /var/tmp/diff_new_pack.ji4394/_new 2007-03-23 22:29:38.000000000 +0100 @@ -13,7 +13,7 @@ Name: openswan BuildRequires: curl-devel gmp-devel htmldoc libjpeg-devel libpcap lynx xorg-x11-devel Version: 2.4.7 -Release: 1 +Release: 8 %define irel 2.4.7 License: GNU General Public License (GPL) Group: Productivity/Networking/Security @@ -45,6 +45,8 @@ Patch11: openswan_11_gcc4cvshead.dif Patch12: openswan_12_gcc4sign.dif Patch13: openswan_13_strfix.dif +Patch15: openswan_15_crypto_helper_fix.dif +Patch16: openswan_16_crypto_inline_fallback.dif # Patch22: openswan_22_send-notifications.dif Patch23: openswan_23_msl2tp-payload-malformed-workaround.dif @@ -99,6 +101,8 @@ %patch11 %patch12 %patch13 +%patch15 +%patch16 # %patch22 %patch23 @@ -249,7 +253,23 @@ %postun %{insserv_cleanup} -%changelog -n openswan +%changelog +* Fri Mar 23 2007 - mt@suse.de +- Bug #234042: Changed back internal nhelpers option default to + use number of CPU-1 crypto worker. Added fallback to perform + inline calculations in main process, when all worker are busy. + Obsolete patch file: openswan_16_nhelpers_default.dif + New patch file name: openswan_16_crypto_inline_fallback.dif +* Fri Mar 16 2007 - mt@suse.de +- Bug #234042: Applied proposed patch fixing bogus crypto helper + management code. The number of crypto helpers (nhelpers option) + has to be set at least to number of tunnels/2 + 1 to take effect. + New patch file: openswan_15_crypto_helper_fix.dif +- Bug #234042: Applied fix to display correct crypto helper number + in debug output of the pluto_do_crypto_op function. Changed the + default of the nhelpers option to 0 (instead of number of CPU-1). + This disables the crypto helpers by default (inline calculation). + New patch file: openswan_16_nhelpers_default.dif * Fri Jan 19 2007 - mt@suse.de - Updated to openswan-2.4.7, providing interop fix for Sonicwall and many other fixes and cleanups, see CHANGES file. ++++++ openswan_15_crypto_helper_fix.dif ++++++ --- programs/pluto/pluto_crypt.c +++ programs/pluto/pluto_crypt.c 2007/03/16 16:52:32 @@ -231,54 +231,45 @@ r->pcr_id = pcw_id++; cn->pcrc_id = r->pcr_id; cn->pcrc_pcr = r; - - pc_worker_num++; - if(pc_worker_num >= pc_workers_cnt) { - pc_worker_num = 0; - } - - cnt = pc_workers_cnt; - - /* find an available worker, restarting one if it was found to be dead */ - w = &pc_workers[pc_worker_num]; - - DBG(DBG_CONTROL - , DBG_log("%d: w->pcw_dead: %d w->pcw_work: %d cnt: %d", - pc_worker_num, w->pcw_dead, w->pcw_work, cnt)); - while((w->pcw_dead || (w->pcw_work >= w->pcw_maxbasicwork)) - && --cnt > 0) { - + cnt = pc_workers_cnt; + do { + /* find an available worker */ pc_worker_num++; + if(pc_worker_num >= pc_workers_cnt) { + pc_worker_num = 0; + } w = &pc_workers[pc_worker_num]; + DBG(DBG_CONTROL + , DBG_log("%d: w->pcw_dead: %d w->pcw_work: %d cnt: %d", + pc_worker_num, w->pcw_dead, w->pcw_work, cnt)); /* see if there is something to clean up after */ if(w->pcw_dead == TRUE && w->pcw_reaped == TRUE) { cleanup_crypto_helper(w, 0); + DBG(DBG_CONTROL + , DBG_log("clnup %d: w->pcw_dead: %d w->pcw_work: %d cnt: %d", + pc_worker_num, w->pcw_dead, w->pcw_work, cnt)); } - DBG(DBG_CONTROL - , DBG_log("%d: w->pcw_dead: %d w->pcw_work: %d cnt: %d", - pc_worker_num, w->pcw_dead, w->pcw_work, cnt)); - } - + + } while(((w->pcw_work >= w->pcw_maxbasicwork)) + && --cnt > 0); + if(cnt == 0 && r->pcr_pcim > pcim_ongoing_crypto) { cnt = pc_workers_cnt; - while((w->pcw_dead || (w->pcw_work >= w->pcw_maxcritwork)) + while((w->pcw_work >= w->pcw_maxcritwork) && --cnt > 0) { - + /* find an available worker */ pc_worker_num++; - w = &pc_workers[pc_worker_num]; - - /* see if there is something to clean up after */ - if(w->pcw_dead == TRUE - && w->pcw_reaped == TRUE) { - cleanup_crypto_helper(w, 0); + if(pc_worker_num >= pc_workers_cnt) { + pc_worker_num = 0; } - DBG(DBG_CONTROL - , DBG_log("crit %d: w->pcw_dead: %d w->pcw_work: %d cnt: %d", - pc_worker_num, w->pcw_dead, w->pcw_work, cnt)); + w = &pc_workers[pc_worker_num]; } + DBG(DBG_CONTROL + , DBG_log("crit %d: w->pcw_dead: %d w->pcw_work: %d cnt: %d", + pc_worker_num, w->pcw_dead, w->pcw_work, cnt)); } if(cnt == 0 && r->pcr_pcim >= pcim_demand_crypto) { @@ -698,6 +689,7 @@ } w->pcw_pid = -1; + w->pcw_work = 0; /* ?!? */ w->pcw_reaped = FALSE; w->pcw_dead = FALSE; /* marking is not dead lets it live again */ } ++++++ openswan_16_crypto_inline_fallback.dif ++++++ --- programs/pluto/pluto_crypt.c +++ programs/pluto/pluto_crypt.c 2007/03/22 09:31:52 @@ -152,7 +152,7 @@ signal(SIGHUP, catchhup); signal(SIGUSR1, catchusr1); - pc_worker_num = helpernum; + pc_helper_num = helpernum; /* make us lower priority that average */ setpriority(PRIO_PROCESS, 0, 10); @@ -288,10 +288,21 @@ if(cnt == 0) { /* didn't find any workers */ DBG(DBG_CONTROL - , DBG_log("failed to find any available worker")); - - *toomuch = TRUE; - return "failed to find any available worker"; + , DBG_log("failed to find any available worker - calculating inline")); + { + reset_cur_state(); + + pluto_do_crypto_op(r); + /* call the continuation */ + (*cn->pcrc_func)(cn, r, NULL); + + /* indicate that we did everything ourselves */ + *toomuch = TRUE; + + pfree(cn); + pfree(r); + return NULL; + } } /* w points to a work. Make sure it is live */ --- programs/pluto/plutomain.c +++ programs/pluto/plutomain.c 2007/03/22 09:21:55 @@ -265,7 +265,7 @@ bool log_to_stderr_desired = FALSE; int lockfd; char* ocspuri = NULL; - int nhelpers = -1; + int nhelpers = -1; char *coredir; #ifdef NAT_TRAVERSAL @@ -421,7 +421,7 @@ if (*endptr != '\0' || endptr == optarg || count < -1) - usage("<interval-time> must be a positive number, 0 or -1"); + usage("<nhelpers> must be a positive number, 0 or -1"); nhelpers = count; } continue; ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Remember to have fun... --------------------------------------------------------------------- To unsubscribe, e-mail: opensuse-commit+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-commit+help@opensuse.org