kernel-netlink: Enable TFC padding only for tunnel mode ESP SAs
The kernel does not allow them for transport mode SAs or IPComp SAs (and of course not for AH SAs). Fixes #446.
This commit is contained in:
parent
194b69f0b8
commit
38a4f1964e
|
@ -1459,8 +1459,8 @@ METHOD(kernel_ipsec_t, add_sa, status_t,
|
|||
goto failed;
|
||||
}
|
||||
|
||||
if (tfc)
|
||||
{
|
||||
if (tfc && protocol == IPPROTO_ESP && mode == MODE_TUNNEL)
|
||||
{ /* the kernel supports TFC padding only for tunnel mode ESP SAs */
|
||||
u_int32_t *tfcpad;
|
||||
|
||||
tfcpad = netlink_reserve(hdr, sizeof(request), XFRMA_TFCPAD,
|
||||
|
|
Loading…
Reference in New Issue