mirror of
				https://github.com/Telecominfraproject/wlan-ap.git
				synced 2025-10-30 18:07:52 +00:00 
			
		
		
		
	bridger: block forward to same ifindex/vlan
Fixes WIFI-13482 Signed-off-by: Rick Sommerville <rick.sommerville@netexperience.com>
This commit is contained in:
		 Rick Sommerville
					Rick Sommerville
				
			
				
					committed by
					
						 John Crispin
						John Crispin
					
				
			
			
				
	
			
			
			 John Crispin
						John Crispin
					
				
			
						parent
						
							1ec29f6705
						
					
				
				
					commit
					be59b10acc
				
			
							
								
								
									
										15
									
								
								feeds/ucentral/bridger/patches/001-no-loops.patch
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										15
									
								
								feeds/ucentral/bridger/patches/001-no-loops.patch
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,15 @@ | |||||||
|  | Index: bridger-2023-05-12-3159bbe0/bpf.c | ||||||
|  | =================================================================== | ||||||
|  | --- bridger-2023-05-12-3159bbe0.orig/bpf.c | ||||||
|  | +++ bridger-2023-05-12-3159bbe0/bpf.c | ||||||
|  | @@ -42,6 +42,10 @@ void bridger_bpf_flow_upload(struct brid | ||||||
|  |  	if (bpf_map_lookup_elem(map_offload, &flow->key, &val) == 0) | ||||||
|  |  		flow->offload.packets = val.packets; | ||||||
|  |   | ||||||
|  | +	if ((flow->key.ifindex == flow->offload.target_port) && | ||||||
|  | +	    (flow->key.vlan == flow->offload.vlan)) { | ||||||
|  | +		return; | ||||||
|  | +	} | ||||||
|  |  	bpf_map_update_elem(map_offload, &flow->key, &flow->offload, BPF_ANY); | ||||||
|  |  } | ||||||
|  |   | ||||||
		Reference in New Issue
	
	Block a user