summaryrefslogtreecommitdiff
path: root/proto/rip/rip.c
diff options
context:
space:
mode:
authorOndrej Zajicek <santiago@crfreenet.org>2012-03-15 12:38:08 +0100
committerOndrej Zajicek <santiago@crfreenet.org>2012-03-15 12:38:08 +0100
commite2bf812f3dc84981eac045b617261987c25b5e90 (patch)
treede7c5849aa5c18174eae79a2e9b394ce540cf896 /proto/rip/rip.c
parentf761503760fba2d4124cc3352f5260c31fac526d (diff)
Fixes RIPng compatibility.
Also probably breaks compatibility with older BIRDs, but RIPng not really worked here. Thanks to Goesta Smekal for the original patch.
Diffstat (limited to 'proto/rip/rip.c')
-rw-r--r--proto/rip/rip.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/proto/rip/rip.c b/proto/rip/rip.c
index 30d2267e..b41c3f8d 100644
--- a/proto/rip/rip.c
+++ b/proto/rip/rip.c
@@ -146,7 +146,11 @@ rip_tx( sock *s )
DBG( "Preparing packet to send: " );
packet->heading.command = RIPCMD_RESPONSE;
+#ifndef IPV6
packet->heading.version = RIP_V2;
+#else
+ packet->heading.version = RIP_NG;
+#endif
packet->heading.unused = 0;
i = !!P_CF->authtype;
@@ -979,7 +983,7 @@ rip_init_config(struct rip_proto_config *c)
{
init_list(&c->iface_list);
c->infinity = 16;
- c->port = 520;
+ c->port = RIP_PORT;
c->period = 30;
c->garbage_time = 120+180;
c->timeout_time = 120;