Hi all,<br clear="all"><br>I am having trouble interpreting the plugins of libhydra, specifically understanding the interfaces which communicate with kernel.<br><br>Scenario:<b> using SS client for IKEv2.</b><br><br>Web link below indicates that by default 'kernel-netlink' of libhydra will be loaded by default for communicating with kernel net-key ipsec stack.<br>
<br><a href="http://wiki.strongswan.org/projects/strongswan/wiki/Pluginlist" target="_blank">http://wiki.strongswan.org/projects/strongswan/wiki/Pluginlist</a> <br><br>which means.. as per my understanding of code base.<br>
<br>Following would be the flow ,<br>
<b>i)</b> ipsec start --> starts the starter in starter.c<br> There is a call libhydra_init("starter") --> initalize kernel interfaces specific to 'starter' for the kernel.<br><b>iii) </b>Starter starts the Charon daemon in line 714 of starter.c.<br>
<b>iii)</b> Inside charon.c line <br> <b>a)</b> again libhydra_init("charon") line 472 --> initialize the kernel interfaces ( including netlink interface) specific to the 'charon' for the kernel<br>
<b> b)</b> line 572 Initalize the charon daemon with 'charon.load' which reads libhydra plugins from "strongswan.conf" pertaning to "charon".<br> <br> In Step<b> b</b>) above, there is a plugin called 'kernel-netlink' which initializes the netlink kernel interfaces for NETKEY ipsec and netlink kernel interfaces for network. ( line 46,48 of kernel_netlink_plugin.c )<br>
<br> My question is, why should we initialize the kernel interface eg. 'kernel-netlink' again when step a) already initializes the 'kernel-netlink' interfaces in libhydra_init.<br><br> Why should the Charon daemon specifically initalize its kernel interfaces like in step b, when libhydra daemon for Charon..already does it in step a.<br>
<br>I am not sure if my understanding or reasoning is correct and I would deeply apppreciate any help to clarify my doubt.<br><br>Regards,<br>RV<br> <br>