* route table change events
@ 2015-11-06 0:48 Murat Sezgin
0 siblings, 0 replies; only message in thread
From: Murat Sezgin @ 2015-11-06 0:48 UTC (permalink / raw)
To: netfilter-devel
Hi all,
In the netfilter conntrack framework, is there a route table change event
handler like netdevice event handler?
I am reading 3.4 and 3.14 kernels, but I couldn't find any, and I
implemented my own notification registration in routing code and a handler
in my own kernel module. With this handler, if there is any change in route
table, (add or remove), an event notify my module and I clean all the
conntrack entires which are created on each netdevice in the system.
I use a code in my block notifier handler something like below:
for_each_netdevice(&init_net, dev) {
nf_ct_iterate_cleanup(&init_net, device_cmp, (void
*)(long)dev->ifindex);
}
I clean up all the conntrack entries, because it is possible that the newly
added route wants to send the traffic through another interface in the
system. If we don't delete the conntrack entry, the old source NAT address
would be remain in the conntrack table for that flow.
Regards,
Murat
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2015-11-06 0:48 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-11-06 0:48 route table change events Murat Sezgin
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).