mirror of
				https://git.proxmox.com/git/mirror_frr
				synced 2025-10-31 05:08:27 +00:00 
			
		
		
		
	bgpd: "default-originate" shouldn't withdraw non-default routes
Prevent "default-originate" from withdrawing non-default routes like 0.0.0.0/1 by checking prefix length. Signed-off-by: Xiao Liang <shaw.leon@gmail.com>
This commit is contained in:
		
							parent
							
								
									a912f8fab7
								
							
						
					
					
						commit
						4d74ba929d
					
				| @ -2169,9 +2169,7 @@ bool subgroup_announce_check(struct bgp_dest *dest, struct bgp_path_info *pi, | ||||
| 	 * configured for default-originate */ | ||||
| 	if (CHECK_FLAG(peer->af_flags[afi][safi], | ||||
| 		       PEER_FLAG_DEFAULT_ORIGINATE)) { | ||||
| 		if (p->family == AF_INET && p->u.prefix4.s_addr == INADDR_ANY) | ||||
| 			return false; | ||||
| 		else if (p->family == AF_INET6 && p->prefixlen == 0) | ||||
| 		if ((p->family == AF_INET || p->family == AF_INET6) && p->prefixlen == 0) | ||||
| 			return false; | ||||
| 	} | ||||
| 
 | ||||
|  | ||||
		Loading…
	
		Reference in New Issue
	
	Block a user
	 Xiao Liang
						Xiao Liang