thom311 / libnl

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

cache: fix new object in callback v2 on updated objects #381

Closed KanjiMonster closed 4 months ago

KanjiMonster commented 4 months ago

When calling the callback v2 for objects that were updated, we pass the update ("obj") instead of the updated object ("old") as new.

Presumably this wasn't intended, so pass the updated object as new.

This avoids weird updates where the new object is significantly smaller than the old one. E.g. for IPv6 multipath route updates, old would be the full route with all nexthops, while new would be a partial route with only the added/removed nexthop.

Fixes: 66d032ad443a ("cache_mngr: add include callback v2")

thom311 commented 4 months ago

lgtm. Thank you!!