hi Henrik,
The RTMGRP_DEL_ROUTE notifications is only sent in fn_hash_delete, not fn_hash_flush. So any routes deleted by other means than fn_hash_delete will go unnotified.
But I cannot say I fully understand the proposed patch. Does not look like the correct place to address this in, but maybe it is? What about multilink routes? In addition it looks to me this will duplicate notifications already sent on normal route deletes. But I have to admit I can not immediately see any obvious better candidate. Feels like these ought to be sent from fib_sync_up/down, but..
Perhaps a acceptable level can be reached if the patch is extended with a
filter to only sent notifications when RTNH_F_DEAD (or not RTNH_F_ZOMBIE) routes are flushed? The RTNH_F_ZOMBIE ones should already have been
notified in fn_hash_delete and is not interesting to send yet another
notification on these I think.
And in addition, shouln't rtmsg_fib be used to construct the message rather than fib_dump_info etc?
I might be wrong, but "rtmsg_fib" seems to be used in conjunction with messages initiated from the user space. one of its arguments is "struct nlmsghdr *n", which I guess is the request received through the netlink socket. I don't have such nlmsghdr in my case and I cannot pass a NULL pointer either because "rtmsg_fib" dereferences the "nlmsg_flags" attribute of "n" (lines 859 and 862 in the original fib_hash.c).
I will check the other points (multilink routes and flags).
regards, John.
- : send the line "unsubscribe linux-net" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html