Fixes RIPng compatibility.
Also probably breaks compatibility with older BIRDs, but RIPng not really worked here. Thanks to Goesta Smekal for the original patch.
This commit is contained in:
parent
f761503760
commit
e2bf812f3d
2 changed files with 21 additions and 5 deletions
|
@ -146,7 +146,11 @@ rip_tx( sock *s )
|
||||||
DBG( "Preparing packet to send: " );
|
DBG( "Preparing packet to send: " );
|
||||||
|
|
||||||
packet->heading.command = RIPCMD_RESPONSE;
|
packet->heading.command = RIPCMD_RESPONSE;
|
||||||
|
#ifndef IPV6
|
||||||
packet->heading.version = RIP_V2;
|
packet->heading.version = RIP_V2;
|
||||||
|
#else
|
||||||
|
packet->heading.version = RIP_NG;
|
||||||
|
#endif
|
||||||
packet->heading.unused = 0;
|
packet->heading.unused = 0;
|
||||||
|
|
||||||
i = !!P_CF->authtype;
|
i = !!P_CF->authtype;
|
||||||
|
@ -979,7 +983,7 @@ rip_init_config(struct rip_proto_config *c)
|
||||||
{
|
{
|
||||||
init_list(&c->iface_list);
|
init_list(&c->iface_list);
|
||||||
c->infinity = 16;
|
c->infinity = 16;
|
||||||
c->port = 520;
|
c->port = RIP_PORT;
|
||||||
c->period = 30;
|
c->period = 30;
|
||||||
c->garbage_time = 120+180;
|
c->garbage_time = 120+180;
|
||||||
c->timeout_time = 120;
|
c->timeout_time = 120;
|
||||||
|
|
|
@ -11,8 +11,19 @@
|
||||||
#define EA_RIP_TAG EA_CODE(EAP_RIP, 0)
|
#define EA_RIP_TAG EA_CODE(EAP_RIP, 0)
|
||||||
#define EA_RIP_METRIC EA_CODE(EAP_RIP, 1)
|
#define EA_RIP_METRIC EA_CODE(EAP_RIP, 1)
|
||||||
|
|
||||||
#define PACKET_MAX 25
|
#define PACKET_MAX 25
|
||||||
#define PACKET_MD5_MAX 18 /* FIXME */
|
#define PACKET_MD5_MAX 18 /* FIXME */
|
||||||
|
|
||||||
|
|
||||||
|
#define RIP_V1 1
|
||||||
|
#define RIP_V2 2
|
||||||
|
#define RIP_NG 1 /* A new version numbering */
|
||||||
|
|
||||||
|
#ifndef IPV6
|
||||||
|
#define RIP_PORT 520 /* RIP for IPv4 */
|
||||||
|
#else
|
||||||
|
#define RIP_PORT 521 /* RIPng */
|
||||||
|
#endif
|
||||||
|
|
||||||
struct rip_connection {
|
struct rip_connection {
|
||||||
node n;
|
node n;
|
||||||
|
@ -37,8 +48,9 @@ struct rip_packet_heading { /* 4 bytes */
|
||||||
#define RIPCMD_TRACEOFF 4 /* turn it off */
|
#define RIPCMD_TRACEOFF 4 /* turn it off */
|
||||||
#define RIPCMD_MAX 5
|
#define RIPCMD_MAX 5
|
||||||
u8 version;
|
u8 version;
|
||||||
#define RIP_V1 1
|
#define RIP_V1 1
|
||||||
#define RIP_V2 2
|
#define RIP_V2 2
|
||||||
|
#define RIP_NG 1 /* this is verion 1 of RIPng */
|
||||||
u16 unused;
|
u16 unused;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue