Commit 672fb78e authored by Ondrej Zajicek (work)'s avatar Ondrej Zajicek (work)
Browse files

Babel: Fix handling of IPv4 retractions

Babel TLV parsing code rejected IPv4 retractions without next-hop,
although next-hop is needed just for regular updates.
parent 268dc7c8
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -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 */