route table change events

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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

--
To unsubscribe from this list: send the line "unsubscribe netfilter-devel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Netfitler Users]     [LARTC]     [Bugtraq]     [Yosemite Forum]

  Powered by Linux