This package adds filters to limit the amount of ARP Requests devices are allowed to send into the mesh. The limits are 6 packets per minute per client device, by MAC address, and 1 per second per node in total. A burst of up to 50 ARP Requests is allowed until the rate-limiting takes effect (see --limit-burst in the ebtables manpage). Furthermore, ARP Requests with a target IP already present in the batman-adv DAT Cache are excluded from the rate-limiting, both regarding counting and filtering, as batman-adv will respond locally with no burden for the mesh. Therefore, this limiter should not affect popular target IPs, like gateways. However it should mitigate the problem of curious people or smart devices scanning the whole IP range. Which could create a significant amount of overhead for all participants so far. Signed-off-by: Linus Lüssing <linus.luessing@c0d3.blue>
		
			
				
	
	
		
			15 lines
		
	
	
		
			293 B
		
	
	
	
		
			Bash
		
	
	
		
			Executable File
		
	
	
	
	
			
		
		
	
	
			15 lines
		
	
	
		
			293 B
		
	
	
	
		
			Bash
		
	
	
		
			Executable File
		
	
	
	
	
| #!/bin/sh /etc/rc.common
 | |
| 
 | |
| USE_PROCD=1
 | |
| START=20
 | |
| STOP=90
 | |
| 
 | |
| start_service() {
 | |
| 	procd_open_instance
 | |
| 	procd_set_param command /usr/sbin/gluon-arp-limiter
 | |
| 	procd_set_param respawn ${respawn_threshold:-3600} ${respawn_timeout:-5} ${respawn_retry:-5}
 | |
| 
 | |
| 	procd_set_param stderr 1
 | |
| 	procd_close_instance
 | |
| }
 |