0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

linuxのコマンドラインで SHREW SOFT VPNCLIENTを使おうとしたらはまった

Last updated at Posted at 2018-02-15

ネットで検索した手順に従ってビルドしてみたが、ikec を起動すると
*** Error in `ikec': double free or corruption (out): 0x00000000........ ***
に。。

ネット上を検索したら、エラー事象の報告はあるけど解決策が無かったのでとりあえず適当にソースを修正。無事VPN Gateway に接続できました。

--- ike_orig/source/libike/manager.file.cpp     2011-02-07 01:40:00.000000000 +0900
+++ ike/source/libike/manager.file.cpp  2018-02-15 10:28:11.268267508 +0900
@@ -178,8 +178,13 @@ bool _CONFIG_MANAGER::file_vpn_load( CON
        else
                path.add( sites_user );

-       path.ins( PATH_DELIM, 1, path.size() - 1 );
-       path.ins( config.get_id(), strlen( config.get_id() ), path.size() - 1 );
+       if (path.size() == 0){
+//             path.add(PATH_DELIM, 1);
+               path.add( config.get_id(), strlen( config.get_id() ));
+       } else {
+               path.ins( PATH_DELIM, 1, path.size() - 1 );
+               path.ins( config.get_id(), strlen( config.get_id() ), path.size() - 1 );
+       }

        return file_vpn_load( config, path.text() );
 }

ちなみに下記のような感じでバックグラウンド実行するとCPU 100%張り付きになりました(泣)。

ikec -r hoge.vpn -u <user> -p <pass> -a &

とりあえず、 source/ikec/main.cpp の while ループに sleep(100)の1行追加。

0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?