mirror of
				git://git.openwrt.org/openwrt/openwrt.git
				synced 2025-11-04 06:54:27 -05:00 
			
		
		
		
	igmpproxy: remove some bashism
"[[" is a bash extension for test. As the ash-implementation is not
fully compatible we drop its usage.
This follows up 3519bf4976
As a result, we also need to move the and/or out of the test brackets.
Signed-off-by: Sven Roederer <devel-sven@geroedel.de>
[squash from two patches, adjust commit message]
Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
			
			
This commit is contained in:
		
							parent
							
								
									492a6594b9
								
							
						
					
					
						commit
						7e67d14486
					
				@ -43,7 +43,7 @@ igmp_add_phyint() {
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
	append netdevs "$device"
 | 
						append netdevs "$device"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	[[ "$direction" = "upstream" ]] && has_upstream=1
 | 
						[ "$direction" = "upstream" ] && has_upstream=1
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	echo -e "\nphyint $device $direction ratelimit 0 threshold 1" >> /var/etc/igmpproxy.conf
 | 
						echo -e "\nphyint $device $direction ratelimit 0 threshold 1" >> /var/etc/igmpproxy.conf
 | 
				
			||||||
 | 
					
 | 
				
			||||||
@ -66,7 +66,9 @@ igmp_add_firewall_routing() {
 | 
				
			|||||||
	config_get direction $1 direction
 | 
						config_get direction $1 direction
 | 
				
			||||||
	config_get zone $1 zone
 | 
						config_get zone $1 zone
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	[[ "$direction" = "downstream" && ! -z "$zone" ]] || return 0
 | 
						if [ "$direction" != "downstream" ] || [ -z "$zone" ]; then
 | 
				
			||||||
 | 
							return 0
 | 
				
			||||||
 | 
						fi
 | 
				
			||||||
 | 
					
 | 
				
			||||||
# First drop SSDP packets then accept all other multicast
 | 
					# First drop SSDP packets then accept all other multicast
 | 
				
			||||||
 | 
					
 | 
				
			||||||
@ -105,7 +107,7 @@ igmp_add_firewall_network() {
 | 
				
			|||||||
	json_add_string target ACCEPT
 | 
						json_add_string target ACCEPT
 | 
				
			||||||
	json_close_object
 | 
						json_close_object
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	[[ "$direction" = "upstream" ]] && {
 | 
						[ "$direction" = "upstream" ] && {
 | 
				
			||||||
		upstream="$zone"
 | 
							upstream="$zone"
 | 
				
			||||||
		config_foreach igmp_add_firewall_routing phyint
 | 
							config_foreach igmp_add_firewall_routing phyint
 | 
				
			||||||
	}
 | 
						}
 | 
				
			||||||
 | 
				
			|||||||
		Loading…
	
		Reference in New Issue
	
	Block a user