summaryrefslogtreecommitdiff
path: root/ripd/ripd.h
diff options
context:
space:
mode:
authorpaul <paul>2003-06-07 01:10:00 +0000
committerpaul <paul>2003-06-07 01:10:00 +0000
commitf38a471c6fc96b63c5754448e9a9e32044c9ffd5 (patch)
tree6b474874414773770e2ad836065ba4658a913b9a /ripd/ripd.h
parent4aaff3f8d57fbb4fc5f4e5e52175a449686c3169 (diff)
From: Andrew J. Schorr <aschorr@telemetry-investments.com>
Subject: [zebra 12403] patch for ripd to accept any version of RIP by default The default Cisco IOS behavior is to send RIP version 1 packets and receive version 1 and version 2 packets. But zebra version 0.92a sends and receives only version 2 packets by default. I have patched the code to change zebra's default behavior to sending version 2 packets (same as before) but receiving both versions. While this is still not identical to Cisco's behavior, it does now accept packets of both versions and retains backwards compatibility with zebra configurations.
Diffstat (limited to 'ripd/ripd.h')
-rw-r--r--ripd/ripd.h8
1 files changed, 7 insertions, 1 deletions
diff --git a/ripd/ripd.h b/ripd/ripd.h
index 23a12c4a..c414c76d 100644
--- a/ripd/ripd.h
+++ b/ripd/ripd.h
@@ -25,6 +25,9 @@
/* RIP version number. */
#define RIPv1 1
#define RIPv2 2
+/* N.B. stuff will break if
+ (RIPv1 != RI_RIP_VERSION_1) || (RIPv2 != RI_RIP_VERSION_2) */
+
/* RIP command list. */
#define RIP_REQUEST 1
@@ -85,7 +88,8 @@ struct rip
int sock;
/* Default version of rip instance. */
- u_char version;
+ int version_send; /* version 1 or 2 (but not both) */
+ int version_recv; /* version 1 or 2 or both */
/* Output buffer of RIP. */
struct stream *obuf;
@@ -322,6 +326,8 @@ struct rip_md5_data
#define RI_RIP_VERSION_1 1
#define RI_RIP_VERSION_2 2
#define RI_RIP_VERSION_1_AND_2 3
+/* N.B. stuff will break if
+ (RIPv1 != RI_RIP_VERSION_1) || (RIPv2 != RI_RIP_VERSION_2) */
/* Default value for "default-metric" command. */
#define RIP_DEFAULT_METRIC_DEFAULT 1