support for macsuck_min_age, arpnip_min_age
This commit is contained in:
		| @@ -336,6 +336,20 @@ Set to true will let nodes accumulate on uplink ports without topology | ||||
| information. This is a debug option to help you figure out your topology and | ||||
| generally should not be set. | ||||
|  | ||||
| =head3 C<macsuck_min_age> | ||||
|  | ||||
| Value: Number. Default: 0. | ||||
|  | ||||
| Sets the minimum amount of time in seconds which must elapse between any two | ||||
| macsuck jobs for a device. | ||||
|  | ||||
| =head3 C<arpnip_min_age> | ||||
|  | ||||
| Value: Number. Default: 0. | ||||
|  | ||||
| Sets the minimum amount of time in seconds which must elapse between any two | ||||
| arpnip jobs for a device. | ||||
|  | ||||
| =head3 C<store_wireless_clients> | ||||
|  | ||||
| Value: Boolean. Default: C<true>. | ||||
| @@ -569,10 +583,6 @@ These settings are from Netdisco 1.x but are yet to be supported in Netdisco | ||||
|  | ||||
| =item * | ||||
|  | ||||
| C<arpnip_min_age> | ||||
|  | ||||
| =item * | ||||
|  | ||||
| C<arpnip_no> | ||||
|  | ||||
| =item * | ||||
| @@ -613,10 +623,6 @@ C<get_community> | ||||
|  | ||||
| =item * | ||||
|  | ||||
| C<macsuck_min_age> | ||||
|  | ||||
| =item * | ||||
|  | ||||
| C<macsuck_no> | ||||
|  | ||||
| =item * | ||||
|   | ||||
| @@ -110,7 +110,7 @@ sub is_discoverable { | ||||
|   if ($device->since_last_discover | ||||
|       and $device->since_last_discover < $discover_since) { | ||||
|  | ||||
|       return _bail_msg("is_discoverable: last discovered less than discover_min_age"); | ||||
|       return _bail_msg("is_discoverable: last discover less than discover_min_age"); | ||||
|   } | ||||
|  | ||||
|   return 1; | ||||
| @@ -152,6 +152,14 @@ sub is_arpnipable { | ||||
|       return 0 if not $okay; | ||||
|   } | ||||
|  | ||||
|   my $arpnip_since = setting('arpnip_min_age') || 0; | ||||
|  | ||||
|   if ($device->since_last_arpnip | ||||
|       and $device->since_last_arpnip < $arpnip_since) { | ||||
|  | ||||
|       return _bail_msg("is_arpnipable: last arpnip less than arpnip_min_age"); | ||||
|   } | ||||
|  | ||||
|   return 1; | ||||
| } | ||||
|  | ||||
| @@ -191,6 +199,14 @@ sub is_macsuckable { | ||||
|       return 0 if not $okay; | ||||
|   } | ||||
|  | ||||
|   my $macsuck_since = setting('macsuck_min_age') || 0; | ||||
|  | ||||
|   if ($device->since_last_macsuck | ||||
|       and $device->since_last_macsuck < $macsuck_since) { | ||||
|  | ||||
|       return _bail_msg("is_macsuckable: last macsuck less than macsuck_min_age"); | ||||
|   } | ||||
|  | ||||
|   return 1; | ||||
| } | ||||
|  | ||||
|   | ||||
		Reference in New Issue
	
	Block a user