[LTP] lapi/xfrm.h: Include system XFRM header and force kernel IPv6 definition
linuxtestproject.agent@gmail.com
linuxtestproject.agent@gmail.com
Wed May 27 15:04:26 CEST 2026
Hi Martin,
On Wed, 27 May 2026, Martin Doucha wrote:
> [PATCH 1/6] lapi/xfrm.h: Include system XFRM header and force kernel IPv6 definition
The commit subject and the in-code comment contradict what the code actually
does. #define _UAPI_IPV6_H satisfies the include guard of linux/ipv6.h,
preventing that header from being pulled in — it does not "force" kernel IPv6
definitions. Both the subject and comment should be corrected.
> +/* Force use of kernel IPv6 definitions to avoid redefinition errors */
> +#define _UAPI_IPV6_H
> +#include <linux/xfrm.h>
Also needs a commit body explaining what specific redefinition error this
fixes. linux/ipv6.h contains struct ipv6hdr and friends; the struct in6_addr
redefinition that typically bites when mixing userspace and kernel IPv6 headers
comes from linux/in6.h (include guard: _UAPI_LINUX_IN6_H). Please confirm
that blocking linux/ipv6.h is sufficient and that the real conflict is not
coming from linux/in6.h, and document the reasoning in the commit message.
[...]
--- [PATCH 5/6] xfrm02: Configure xfrm using direct netlink request ---
> - ret = tst_cmd(xfrm_cmd, NULL, NULL, TST_CMD_PASS_RETVAL);
> - if (ret)
> - tst_brk(TBROK, "Failed to install xfrm ESP-in-TCP state");
> + ctx = NETLINK_CREATE_CONTEXT(NETLINK_XFRM);
The patch correctly removes .needs_cmds from xfrm01 after dropping the ip(8)
call, but the equivalent removal is missing from xfrm02:
.needs_cmds = (struct tst_cmd[]) {
{.cmd = "ip"},
{}
},
ip(8) is no longer invoked; drop .needs_cmds here too.
No linux-git tag for CVE-2026-46300. If a kernel fix commit exists, add one.
--- [PATCH 6/6] xfrm03: Configure xfrm using direct netlink request ---
Same stale .needs_cmds as patch 5/6 — xfrm03 still requires ip(8) in the
test descriptor even though it is no longer called.
---
Note:
The agent can sometimes produce false positives although often its
findings are genuine. If you find issues with the review, please
comment this email or ignore the suggestions.
Regards,
LTP AI Reviewer
More information about the ltp
mailing list