]> git.ipfire.org Git - thirdparty/bird.git/commitdiff
Babel: Fix handling of IPv4 retractions
authorOndrej Zajicek (work) <santiago@crfreenet.org>
Wed, 8 Nov 2017 13:15:11 +0000 (14:15 +0100)
committerOndrej Zajicek (work) <santiago@crfreenet.org>
Thu, 7 Dec 2017 12:53:42 +0000 (13:53 +0100)
Babel TLV parsing code rejected IPv4 retractions without next-hop,
although next-hop is needed just for regular updates.

proto/babel/packets.c

index 6e8d2eb5793dfee9144139319615395ced361939..8e972db245f395f72a559d49fee84a2b2c94a98b 100644 (file)
@@ -593,8 +593,8 @@ babel_read_update(struct babel_tlv *hdr, union babel_msg *m,
     if (tlv->omitted && !state->def_ip4_prefix_seen)
       return PARSE_ERROR;
 
-    /* Need next hop for v4 routes */
-    if (ipa_zero(state->next_hop_ip4))
+    /* Update must have next hop, unless it is retraction */
+    if (ipa_zero(state->next_hop_ip4) && (msg->metric != BABEL_INFINITY))
       return PARSE_ERROR;
 
     /* Merge saved prefix and received prefix parts */