mirror of
				https://git.proxmox.com/git/mirror_frr
				synced 2025-10-31 03:30:07 +00:00 
			
		
		
		
	Merge branch 'cmaster' of ssh://stash.cumulusnetworks.com:7999/quag/quagga into cmaster
This commit is contained in:
		
						commit
						9246e792aa
					
				| @ -1,7 +1,7 @@ | ||||
| ## Process this file with automake to produce Makefile.in.
 | ||||
| 
 | ||||
| INCLUDES = @INCLUDES@ -I.. -I$(top_srcdir) -I$(top_srcdir)/lib -I$(top_builddir)/lib | ||||
| DEFS = @DEFS@ -DSYSCONFDIR=\"$(sysconfdir)/\" | ||||
| DEFS = @DEFS@ -DSYSCONFDIR=\"$(sysconfdir)/\" -DMULTIPATH_NUM=@MULTIPATH_NUM@ | ||||
| INSTALL_SDATA=@INSTALL@ -m 600 | ||||
| 
 | ||||
| AM_CFLAGS = $(PICFLAGS) $(WERROR) | ||||
|  | ||||
| @ -1011,6 +1011,11 @@ bgp_maxpaths_config_vty (struct vty *vty, int peer_type, const char *mpaths, | ||||
| 
 | ||||
|   bgp_recalculate_all_bestpaths (bgp); | ||||
| 
 | ||||
|   if ((MULTIPATH_NUM != 0) && (maxpaths > MULTIPATH_NUM)) | ||||
|     vty_out (vty, | ||||
| 	     "%% Warning: maximum-paths set to %d is greater than %d that zebra is compiled to support%s", | ||||
| 	     maxpaths, MULTIPATH_NUM, VTY_NEWLINE); | ||||
| 
 | ||||
|   return CMD_SUCCESS; | ||||
| } | ||||
| 
 | ||||
|  | ||||
| @ -780,7 +780,6 @@ netlink_routing_table (struct sockaddr_nl *snl, struct nlmsghdr *h) | ||||
|               if (len < (int) sizeof (*rtnh) || rtnh->rtnh_len > len) | ||||
|                 break; | ||||
| 
 | ||||
|               rib->nexthop_num++; | ||||
|               index = rtnh->rtnh_ifindex; | ||||
|               gate = 0; | ||||
|               if (rtnh->rtnh_len > sizeof (*rtnh)) | ||||
| @ -806,6 +805,8 @@ netlink_routing_table (struct sockaddr_nl *snl, struct nlmsghdr *h) | ||||
|               rtnh = RTNH_NEXT(rtnh); | ||||
|             } | ||||
| 
 | ||||
| 	  zserv_nexthop_num_warn(__func__, (const struct prefix *)&p, | ||||
| 				 rib->nexthop_num); | ||||
|           if (rib->nexthop_num == 0) | ||||
|             XFREE (MTYPE_RIB, rib); | ||||
|           else | ||||
| @ -983,7 +984,6 @@ netlink_route_change (struct sockaddr_nl *snl, struct nlmsghdr *h) | ||||
|                   if (len < (int) sizeof (*rtnh) || rtnh->rtnh_len > len) | ||||
|                     break; | ||||
| 
 | ||||
|                   rib->nexthop_num++; | ||||
|                   index = rtnh->rtnh_ifindex; | ||||
|                   gate = 0; | ||||
|                   if (rtnh->rtnh_len > sizeof (*rtnh)) | ||||
| @ -1009,6 +1009,9 @@ netlink_route_change (struct sockaddr_nl *snl, struct nlmsghdr *h) | ||||
|                   rtnh = RTNH_NEXT(rtnh); | ||||
|                 } | ||||
| 
 | ||||
| 	      zserv_nexthop_num_warn(__func__, (const struct prefix *)&p, | ||||
| 				     rib->nexthop_num); | ||||
| 
 | ||||
|               if (rib->nexthop_num == 0) | ||||
|                 XFREE (MTYPE_RIB, rib); | ||||
|               else | ||||
|  | ||||
| @ -1015,6 +1015,18 @@ zread_interface_delete (struct zserv *client, u_short length) | ||||
|   return 0; | ||||
| } | ||||
| 
 | ||||
| void | ||||
| zserv_nexthop_num_warn (const char *caller, const struct prefix *p, const u_char nexthop_num) | ||||
| { | ||||
|   if ((MULTIPATH_NUM != 0) && (nexthop_num > MULTIPATH_NUM)) | ||||
|     { | ||||
|       char buff[80]; | ||||
|       prefix2str(p, buff, 80); | ||||
|       zlog_warn("%s: Prefix %s has %d nexthops, but we can only use the first %d", | ||||
| 		caller, buff, nexthop_num, MULTIPATH_NUM); | ||||
|     } | ||||
| } | ||||
| 
 | ||||
| /* This function support multiple nexthop. */ | ||||
| /* 
 | ||||
|  * Parse the ZEBRA_IPV4_ROUTE_ADD sent from client. Update rib and | ||||
| @ -1060,6 +1072,7 @@ zread_ipv4_add (struct zserv *client, u_short length) | ||||
|   if (CHECK_FLAG (message, ZAPI_MESSAGE_NEXTHOP)) | ||||
|     { | ||||
|       nexthop_num = stream_getc (s); | ||||
|       zserv_nexthop_num_warn(__func__, (const struct prefix *)&p, nexthop_num); | ||||
| 
 | ||||
|       for (i = 0; i < nexthop_num; i++) | ||||
| 	{ | ||||
| @ -1295,6 +1308,7 @@ zread_ipv4_route_ipv6_nexthop_add (struct zserv *client, u_short length) | ||||
|       int max_nh_if = 0; | ||||
| 
 | ||||
|       nexthop_num = stream_getc (s); | ||||
|       zserv_nexthop_num_warn(__func__, (const struct prefix *)&p, nexthop_num); | ||||
|       for (i = 0; i < nexthop_num; i++) | ||||
| 	{ | ||||
| 	  nexthop_type = stream_getc (s); | ||||
| @ -1415,7 +1429,8 @@ zread_ipv6_add (struct zserv *client, u_short length) | ||||
|       int max_nh_if = 0; | ||||
| 
 | ||||
|       nexthop_num = stream_getc (s); | ||||
|       for (i = 0; i < nexthop_num; i++) | ||||
|       zserv_nexthop_num_warn(__func__, (const struct prefix *)&p, nexthop_num); | ||||
|       for (i = 0; i < nexthop_num; i++)  | ||||
| 	{ | ||||
| 	  nexthop_type = stream_getc (s); | ||||
| 
 | ||||
|  | ||||
| @ -155,6 +155,7 @@ extern int zsend_router_id_update(struct zserv *, struct prefix *); | ||||
| extern pid_t pid; | ||||
| 
 | ||||
| extern void zserv_create_header(struct stream *s, uint16_t cmd); | ||||
| extern void zserv_nexthop_num_warn(const char *, const struct prefix *, const u_char); | ||||
| extern int zebra_server_send_message(struct zserv *client); | ||||
| 
 | ||||
| extern void zebra_route_map_write_delay_timer(struct vty *); | ||||
|  | ||||
		Loading…
	
		Reference in New Issue
	
	Block a user
	 Dinesh G Dutt
						Dinesh G Dutt