summaryrefslogtreecommitdiffstats
path: root/ripd/ripd.h
diff options
context:
space:
mode:
authorLu Feng <lu.feng@6wind.com>2014-06-25 09:43:15 +0200
committerDaniel Walton <dwalton@cumulusnetworks.com>2016-05-26 03:06:37 +0200
commit6a7cff75c64651d940b5bfc4bcf83e64fbb8345f (patch)
tree71936b3c874096836bf3745b28d38589aeedb081 /ripd/ripd.h
parentbgpd: route-map: share aspath object compilation code where possible (diff)
downloadfrr-6a7cff75c64651d940b5bfc4bcf83e64fbb8345f.tar.xz
frr-6a7cff75c64651d940b5bfc4bcf83e64fbb8345f.zip
ripd: use only one constant for derivation
RIP_MAX_RTE is defined in ripd.h as 25 but is in fact the result of a formula. More over it is not used in the code: the code itself includes the fomula. This makes it un-clear for maintenance. Signed-off-by: Feng Lu <lu.feng@6wind.com> Reviewed-by: Alain Ritoux <alain.ritoux@6wind.com> Signed-off-by: David Lamparter <equinox@opensourcerouting.org> (cherry picked from commit 342a31bfda21616209366679ac522471e5772a2f)
Diffstat (limited to 'ripd/ripd.h')
-rw-r--r--ripd/ripd.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/ripd/ripd.h b/ripd/ripd.h
index fe1345c6f..390f832db 100644
--- a/ripd/ripd.h
+++ b/ripd/ripd.h
@@ -49,7 +49,7 @@
#define RIP_RTE_SIZE 20
/* Max count of routing table entry in one rip packet. */
-#define RIP_MAX_RTE 25
+#define RIP_MAX_RTE ((RIP_PACKET_MAXSIZ - RIP_HEADER_SIZE) / RIP_RTE_SIZE)
/* RIP version 2 multicast address. */
#ifndef INADDR_RIP_GROUP