Move the body of inet6_rt_notify() to __inet6_rt_notify() and give it the deletion reason. inet6_rt_notify() keeps its prototype, so the route addition path does not change. Add inet6_rt_del_notify() and call it from fib6_del_route(). RTA_DEL_REASON now reaches user space on RTM_DELROUTE for routes the kernel deleted on its own.
Showing the changes to include (1 of 3 files). Show all
Unified · Split
| @@ -533,6 +533,8 @@ static inline void fib6_rt_update(struct net *net, struct fib6_info *rt, · 532 unmodified lines | ||
| 533 | 533 | #endif |
| 534 | 534 | void inet6_rt_notify(int event, struct fib6_info *rt, struct nl_info *info, |
| 535 | 535 | unsigned int flags); |
| 536 | +void inet6_rt_del_notify(struct fib6_info *rt, struct nl_info *info, | |
| 537 | + enum rt_del_reason del_reason); | |
| 536 | 538 | |
| 537 | 539 | void fib6_age_exceptions(struct fib6_info *rt, struct fib6_gc_args *gc_args, |
| 538 | 540 | unsigned long now); |