From: Donald Sharp Date: Mon, 18 Jan 2016 17:44:52 +0000 (-0800) Subject: bgpd: Fix work-quanta to be a reasonable value X-Git-Tag: frr-2.0-rc1~1160 X-Git-Url: https://git.puffer.fish/?a=commitdiff_plain;h=4543bbb45ed250f2a6e63ada7d248e2167d02c66;p=mirror%2Ffrr.git bgpd: Fix work-quanta to be a reasonable value The work-quanta that a user can specify is ~4billion. If a user specifies such a large value this translates into processing 4billion outgoing packets before moving onto the next interface. This makes no sense. Reduce the value of allowed work quanta's to be between 1 and 10000. Signed-off-by: Donald Sharp Reviewed-by: Don Slice Reviewed-by: Daniel Walton Reviewed-by: Vivek Venkatraman --- diff --git a/bgpd/bgp_vty.c b/bgpd/bgp_vty.c index 62827dad28..db4d215331 100644 --- a/bgpd/bgp_vty.c +++ b/bgpd/bgp_vty.c @@ -1294,7 +1294,7 @@ bgp_wpkt_quanta_config_vty (struct vty *vty, const char *num, char set) if (set) VTY_GET_INTEGER_RANGE ("write-quanta", bgp->wpkt_quanta, num, - 1, 4294967295); + 1, 10000); else bgp->wpkt_quanta = BGP_WRITE_PACKET_MAX; @@ -1315,7 +1315,7 @@ bgp_config_write_wpkt_quanta (struct vty *vty, struct bgp *bgp) /* Update-delay configuration */ DEFUN (bgp_wpkt_quanta, bgp_wpkt_quanta_cmd, - "write-quanta <1-4294967295>", + "write-quanta <1-10000>", "How many packets to write to peer socket per run\n" "Number of packets\n") { @@ -1325,7 +1325,7 @@ DEFUN (bgp_wpkt_quanta, /* Update-delay deconfiguration */ DEFUN (no_bgp_wpkt_quanta, no_bgp_wpkt_quanta_cmd, - "no write-quanta <1-4294967295>", + "no write-quanta <1-10000>", "How many packets to write to peer socket per run\n" "Number of packets\n") {