summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPavel Machek <pavel@ucw.cz>2000-01-26 15:12:18 +0100
committerPavel Machek <pavel@ucw.cz>2000-01-26 15:12:18 +0100
commitbd215f8bab7e0d94fa482b47ff8d5971cd5ab799 (patch)
tree3db5549f6281847d97af4f1f687f94efabda6eba
parent8660913ba83d66491caf407a7e6eb16a4eeda2d0 (diff)
downloadbird-bd215f8bab7e0d94fa482b47ff8d5971cd5ab799.tar
bird-bd215f8bab7e0d94fa482b47ff8d5971cd5ab799.zip
Do not send empty packets in rip.
-rw-r--r--proto/rip/rip.c12
1 files changed, 8 insertions, 4 deletions
diff --git a/proto/rip/rip.c b/proto/rip/rip.c
index 6e3f8cd..0819319 100644
--- a/proto/rip/rip.c
+++ b/proto/rip/rip.c
@@ -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" );