summaryrefslogtreecommitdiffstats
path: root/proto/rip/rip.c
diff options
context:
space:
mode:
authorPavel Machek <pavel@ucw.cz>1999-05-31 22:34:48 +0200
committerPavel Machek <pavel@ucw.cz>1999-05-31 22:34:48 +0200
commit9de840bdbd59669a129f68f1ff3595b34439ec09 (patch)
tree48f20644efd3cdb765a6e5482173c0b0739dcc7c /proto/rip/rip.c
parentb94bbe00278b0c6e84f34875367d85d34d08621b (diff)
downloadbird-9de840bdbd59669a129f68f1ff3595b34439ec09.tar
bird-9de840bdbd59669a129f68f1ff3595b34439ec09.zip
Set corectly destination address for RIP multicast. Broadcasting &
multicasting rip actually works [broadcasting is kind of hard to turn it on, through].
Diffstat (limited to 'proto/rip/rip.c')
-rw-r--r--proto/rip/rip.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/proto/rip/rip.c b/proto/rip/rip.c
index 616994e..a3ddf61 100644
--- a/proto/rip/rip.c
+++ b/proto/rip/rip.c
@@ -489,14 +489,14 @@ new_iface(struct proto *p, struct iface *new, unsigned long flags, struct iface_
rif->sock->dport = P_CF->port;
rif->sock->ttl = 1; /* FIXME: care must be taken not to send requested responses from this socket */
- if (want_multicast) {
- rif->sock->daddr = ipa_from_u32(0xe0000009);
- rif->sock->saddr = ipa_from_u32(0xe0000009);
- }
if (flags & IF_BROADCAST)
rif->sock->daddr = new->addr->brd;
if (flags & IF_UNNUMBERED) /* Hmm, rip is not defined over unnumbered links */
rif->sock->daddr = new->addr->opposite;
+ if (want_multicast) {
+ rif->sock->daddr = ipa_from_u32(0xe0000009);
+ rif->sock->saddr = ipa_from_u32(0xe0000009);
+ }
if (!ipa_nonzero(rif->sock->daddr)) {
log( L_WARN "RIP/%s: interface %s is too strange for me", P_NAME, rif->iface ? rif->iface->name : "(dummy)" );