thom311 / libnl

Netlink Library Suite
GNU Lesser General Public License v2.1
419 stars 313 forks source link

Cache operations aren't sensitive to flush operations #315

Open nhorman opened 2 years ago

nhorman commented 2 years ago

In working with the various libnl3 cache operations, I don't receive any notification callback in the event of a flush operation (XFRM_MSG_FLUSHSA/XFRM_MSG_FLUSHPOL/etc). Looking at the code it appears the various corresponding nl_cache_ops structures all only encode the new/del/get/upd operations). Is this by design, or is there a way for a cache manager to notify an application of a flush operation?

thom311 commented 2 years ago

I don't know, I am not familiar with that code (oddly enough, sorry about that :) ).

It does sound like a a bug, patch welcome!

nhorman commented 2 years ago

copy that, Just wanted to be sure that there wasn't a reason all the caches ignored flush messages, before I worked something up. Thanks!