]> git.ipfire.org Git - thirdparty/bird.git/commitdiff
Do not send empty packets in rip.
authorPavel Machek <pavel@ucw.cz>
Wed, 26 Jan 2000 14:12:18 +0000 (14:12 +0000)
committerPavel Machek <pavel@ucw.cz>
Wed, 26 Jan 2000 14:12:18 +0000 (14:12 +0000)
proto/rip/rip.c

index 6e3f8cdd6f0e557a6ef0066ed1890a793b34240e..081931912b2c523d51d0f4e0b56db4a4cfe346fd 100644 (file)
@@ -162,10 +162,14 @@ rip_tx( sock *s )
     if (i == !!P_CF->authtype)
       continue;
 #endif
-    if (ipa_nonzero(c->daddr))
-      i = sk_send_to( s, packetlen, c->daddr, c->dport );
-    else
-      i = sk_send( s, packetlen );
+    if (!i)
+      DBG( "not sending NULL update\n" );
+    else {
+      if (ipa_nonzero(c->daddr))
+       i = sk_send_to( s, packetlen, c->daddr, c->dport );
+      else
+       i = sk_send( s, packetlen );
+    }
 
     DBG( "it wants more\n" );