xfrm: don't send SA_PCPU during get/delete#1172
Conversation
Since Linux v6.13 or 83dfce38c49f ("xfrm: Restrict percpu SA attribute to
specific netlink message types") SA_PCPU is only allowed in MSG_NEWSA, UPDSA,
ALLOCSPI, ACQUIRE. For all other commands, it needs to be unset.
Also fix accessing *sa.Pcpunum in XfrmState.String() that would panic when the
field is nil.
Signed-off-by: Timo Beckers <timo@incline.eu>
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (1)
📝 WalkthroughWalkthroughChanges to XfrmState.String() method to print Pcpunum as a string with nil handling. Removal of PCPU attribute emission in xfrmStateGetOrDelete when reading or deleting state. Changes
Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes Poem
🚥 Pre-merge checks | ✅ 3✅ Passed checks (3 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
|
Thank you @ti-mo ! LGTM |
Since Linux v6.13 or 83dfce38c49f ("xfrm: Restrict percpu SA attribute to specific netlink message types") SA_PCPU is only allowed in MSG_NEWSA, UPDSA, ALLOCSPI, ACQUIRE. For all other commands, it needs to be unset.
Also fix accessing *sa.Pcpunum in XfrmState.String() that would panic when the field is nil.
Summary by CodeRabbit