}
}
+ /* Distance */
+ SET_FLAG (zapi_flags, ZAPI_MESSAGE_DISTANCE);
+ stream_putc (s, rib->distance);
+
/* Metric */
- if (cmd == ZEBRA_REDISTRIBUTE_IPV4_ADD || cmd == ZEBRA_REDISTRIBUTE_IPV6_ADD)
- {
- SET_FLAG (zapi_flags, ZAPI_MESSAGE_DISTANCE);
- stream_putc (s, rib->distance);
- SET_FLAG (zapi_flags, ZAPI_MESSAGE_METRIC);
- stream_putl (s, rib->metric);
+ SET_FLAG (zapi_flags, ZAPI_MESSAGE_METRIC);
+ stream_putl (s, rib->metric);
- /* tag */
- if (rib->tag)
- {
- SET_FLAG(zapi_flags, ZAPI_MESSAGE_TAG);
- stream_putw(s, rib->tag);
- }
- SET_FLAG (zapi_flags, ZAPI_MESSAGE_MTU);
- stream_putl (s, rib->mtu);
+ /* Tag */
+ if (rib->tag)
+ {
+ SET_FLAG(zapi_flags, ZAPI_MESSAGE_TAG);
+ stream_putw(s, rib->tag);
}
+ /* MTU */
+ SET_FLAG (zapi_flags, ZAPI_MESSAGE_MTU);
+ stream_putl (s, rib->mtu);
+
/* write real message flags value */
stream_putc_at (s, messmark, zapi_flags);