mirror of
https://git.proxmox.com/git/mirror_iproute2
synced 2025-10-04 21:03:26 +00:00
xfrm: also check for ipv6 state in xfrm_state_keep
As commitf9d696cf41
("xfrm: not try to delete ipcomp states when using deleteall") does, this patch is to fix the same issue for ip6 state where xsinfo->id.proto == IPPROTO_IPV6. # ip xfrm state add src 2000::1 dst 2000::2 spi 0x1000 \ proto comp comp deflate mode tunnel sel src 2000::1 dst \ 2000::2 proto gre # ip xfrm sta deleteall Failed to send delete-all request : Operation not permitted Note that the xsinfo->proto in common states can never be IPPROTO_IPV6. Fixes:f9d696cf41
("xfrm: not try to delete ipcomp states when using deleteall") Reported-by: Xiumei Mu <xmu@redhat.com> Signed-off-by: Xin Long <lucien.xin@gmail.com> Acked-by: Andrea Claudi <aclaudi@redhat.com> Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
This commit is contained in:
parent
0149dabf2a
commit
d27fc6390c
@ -1131,7 +1131,8 @@ static int xfrm_state_keep(struct nlmsghdr *n, void *arg)
|
||||
if (!xfrm_state_filter_match(xsinfo))
|
||||
return 0;
|
||||
|
||||
if (xsinfo->id.proto == IPPROTO_IPIP)
|
||||
if (xsinfo->id.proto == IPPROTO_IPIP ||
|
||||
xsinfo->id.proto == IPPROTO_IPV6)
|
||||
return 0;
|
||||
|
||||
if (xb->offset > xb->size) {
|
||||
|
Loading…
Reference in New Issue
Block a user