Query on PF_KEY vs. Netlink interface
Chintu Aggarwal <[email protected]> Fri, 6 Jun 2014 16:36:00 +0530
| Newsgroups | gmane.ietf.ipsec,gmane.linux.ipv6.usagi.users |
|---|---|
| Message-ID | <CAFbuYbm3=4J5qihmy+eyTpiiStERwrHD1Mjf2JEE8S-cUS1OuA@mail.gmail.com> |
--===============6746176796455281696==
Content-Type: multipart/alternative; boundary=047d7b343d5ac4468304fb28d880
--047d7b343d5ac4468304fb28d880
Content-Type: text/plain; charset=UTF-8
Hi
There was this query as below posted sometime back, but I couldn't find the
response to it. Can someone please provide the details?
Thanks,
Chintu
-----------------------------------------------------------------------------------------------------------------------
In net/key/af_key.c, there are something about PF_KEY as follows:
static struct xfrm_mgr pfkeyv2_mgr =
{
.id = "pfkeyv2",
.notify = pfkey_send_notify,
.acquire = pfkey_send_acquire,
.compile_policy = pfkey_compile_policy,
.new_mapping = pfkey_send_new_mapping,
};
In net/xfrm/xfrm_user.c, there are also something about Netlink as follows:
static struct xfrm_mgr netlink_mgr = {
.id = "netlink",
.notify = xfrm_send_state_notify,
.acquire = xfrm_send_acquire,
.compile_policy = xfrm_compile_policy,
.notify_policy = xfrm_send_policy_notify,
};
When kernel send a message to racoon for setting up a SA, both
pfkey_send_acquire() and xfrm_send_acquire() seem to be getting invoked.
My query is what is the relationship between PF_KEY and Netlink in Linux
kernel, when we use IPsec?
--047d7b343d5ac4468304fb28d880
Content-Type: text/html; charset=UTF-8
Content-Transfer-Encoding: quoted-printable
<div dir=3D"ltr">Hi<div><br></div><div>There was this query as below posted=
sometime back, but I couldn't find the response to it. Can someone ple=
ase provide the details?</div><div><br></div><div>Thanks,</div><div>Chintu<=
/div>
<div><br></div><div>-------------------------------------------------------=
----------------------------------------------------------------</div><div>=
<br></div><div><div style=3D"color:rgb(0,0,0);font-family:'Times New Ro=
man';font-size:medium">
In net/key/af_key.c, there are something about PF_KEY as follows:</div><div=
style=3D"color:rgb(0,0,0);font-family:'Times New Roman';font-size:=
medium">static struct xfrm_mgr pfkeyv2_mgr =3D<br>{<br>=C2=A0=C2=A0=C2=A0=
=C2=A0=C2=A0=C2=A0=C2=A0 .id=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=
=A0=C2=A0=C2=A0=C2=A0=C2=A0 =3D "pfkeyv2",<br>
=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 .notify=C2=A0=C2=A0=C2=A0=C2=A0=
=C2=A0=C2=A0=C2=A0=C2=A0 =3D pfkey_send_notify,<br>=C2=A0=C2=A0=C2=A0=C2=A0=
=C2=A0=C2=A0=C2=A0 .acquire=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 =3D p=
fkey_send_acquire,=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0<br=
>=C2=A0.compile_policy =3D pfkey_compile_policy,<br>=C2=A0=C2=A0=C2=A0=C2=
=A0=C2=A0=C2=A0=C2=A0 .new_mapping=C2=A0=C2=A0=C2=A0 =3D pfkey_send_new_map=
ping,<br>};</div><div style=3D"color:rgb(0,0,0);font-family:'Times New =
Roman';font-size:medium">
<br></div><div style=3D"color:rgb(0,0,0);font-family:'Times New Roman&#=
39;;font-size:medium">=C2=A0=C2=A0=C2=A0</div><div style=3D"color:rgb(0,0,0=
);font-family:'Times New Roman';font-size:medium">In net/xfrm/xfrm_=
user.c, there are also something about Netlink as follows:</div>
<div style=3D"color:rgb(0,0,0);font-family:'Times New Roman';font-s=
ize:medium">static struct xfrm_mgr netlink_mgr =3D {<br>=C2=A0=C2=A0=C2=A0=
=C2=A0=C2=A0=C2=A0=C2=A0 .id=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=
=A0=C2=A0=C2=A0=C2=A0=C2=A0 =3D "netlink",<br>=C2=A0=C2=A0=C2=A0=
=C2=A0=C2=A0=C2=A0=C2=A0 .notify=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=
=C2=A0 =3D xfrm_send_state_notify,<br>
=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 .acquire=C2=A0=C2=A0=C2=A0=C2=A0=
=C2=A0=C2=A0=C2=A0 =3D xfrm_send_acquire,<br>=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=
=C2=A0=C2=A0 .compile_policy =3D xfrm_compile_policy,<br>=C2=A0=C2=A0=C2=A0=
=C2=A0=C2=A0=C2=A0=C2=A0 .notify_policy=C2=A0 =3D xfrm_send_policy_notify,<=
br>};</div><div style=3D"color:rgb(0,0,0);font-family:'Times New Roman&=
#39;;font-size:medium">
=C2=A0 =C2=A0<br></div><div style=3D"color:rgb(0,0,0);font-family:'Time=
s New Roman';font-size:medium">When kernel send a message to racoon for=
setting up a SA, both pfkey_send_acquire() and xfrm_send_acquire() seem to=
be getting invoked.</div>
<div style=3D"color:rgb(0,0,0);font-family:'Times New Roman';font-s=
ize:medium"><br>My query is what is the relationship between PF_KEY and Net=
link in Linux kernel, when we use IPsec?</div></div></div>
--047d7b343d5ac4468304fb28d880--
--===============6746176796455281696==
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Disposition: inline
_______________________________________________
IPsec mailing list
[email protected]
https://www.ietf.org/mailman/listinfo/ipsec
--===============6746176796455281696==--