]> git.ipfire.org Git - thirdparty/bird.git/commitdiff
Fixes sockets for IPv4 RIP.
authorOndrej Zajicek <santiago@crfreenet.org>
Wed, 26 Oct 2011 11:55:24 +0000 (13:55 +0200)
committerOndrej Zajicek <santiago@crfreenet.org>
Wed, 26 Oct 2011 12:10:49 +0000 (14:10 +0200)
Thanks Roman Hoog Antink for a suggestion.

proto/rip/rip.c

index 0259cfb545161cb73c00eb3d5e28705981b2ff20..1266380d8db7cff2df013255ef3278a53ed9dbf6 100644 (file)
@@ -706,17 +706,16 @@ new_iface(struct proto *p, struct iface *new, unsigned long flags, struct iface_
   if (new) {
     if (new->addr->flags & IA_PEER)
       log( L_WARN "%s: rip is not defined over unnumbered links", p->name );
+    rif->sock->saddr = IPA_NONE;
     if (rif->multicast) {
 #ifndef IPV6
       rif->sock->daddr = ipa_from_u32(0xe0000009);
-      rif->sock->saddr = ipa_from_u32(0xe0000009);
 #else
       rif->sock->daddr = ipa_build(0xff020000, 0, 0, 9);
-      rif->sock->saddr = new->addr->ip;
+      rif->sock->saddr = new->addr->ip; /* Does not really work on Linux */
 #endif
     } else {
       rif->sock->daddr = new->addr->brd;
-      rif->sock->saddr = new->addr->brd;
     }
   }