On Tuesday, April 17, 2012 12:24:53 Antonio Quartulli wrote:
+static void arp_change_timeout(struct net_device *soft_iface, bool enable_dat) +{
struct in_device *in_dev = in_dev_get(soft_iface);
if (!in_dev) {
pr_err("Unable to set ARP parameters for the batman
interface '%s'\n", + soft_iface->name);
return;
}
if (enable_dat) {
/* Introduce a delay in the ARP state-machine transactions.
* Entries will be kept in the ARP table for the default
time + * multiplied by 4
*/
in_dev->arp_parms->base_reachable_time *=
ARP_TIMEOUT_FACTOR; + in_dev->arp_parms->gc_staletime *= ARP_TIMEOUT_FACTOR; + in_dev->arp_parms->reachable_time *= ARP_TIMEOUT_FACTOR; + } else {
in_dev->arp_parms->base_reachable_time /=
ARP_TIMEOUT_FACTOR; + in_dev->arp_parms->gc_staletime /= ARP_TIMEOUT_FACTOR; + in_dev->arp_parms->reachable_time /= ARP_TIMEOUT_FACTOR; + }
in_dev_put(in_dev);
+}
One more thing: Are we never going to release the in_dev ?
Regards, Marek