diff options
Diffstat (limited to 'zebra/zapi_msg.c')
| -rw-r--r-- | zebra/zapi_msg.c | 19 |
1 files changed, 10 insertions, 9 deletions
diff --git a/zebra/zapi_msg.c b/zebra/zapi_msg.c index adf9dfa000..4c0a0c82bf 100644 --- a/zebra/zapi_msg.c +++ b/zebra/zapi_msg.c @@ -1171,7 +1171,7 @@ static void zread_rnh_register(ZAPI_HANDLER_ARGS) struct stream *s; struct prefix p; unsigned short l = 0; - uint8_t flags = 0; + uint8_t connected = 0; uint8_t resolve_via_default; bool exist; bool flag_changed = false; @@ -1189,7 +1189,7 @@ static void zread_rnh_register(ZAPI_HANDLER_ARGS) client->nh_reg_time = monotime(NULL); while (l < hdr->length) { - STREAM_GETC(s, flags); + STREAM_GETC(s, connected); STREAM_GETC(s, resolve_via_default); STREAM_GETW(s, p.family); STREAM_GETC(s, p.prefixlen); @@ -1226,9 +1226,10 @@ static void zread_rnh_register(ZAPI_HANDLER_ARGS) return; orig_flags = rnh->flags; - if (flags && !CHECK_FLAG(rnh->flags, ZEBRA_NHT_CONNECTED)) + if (connected && !CHECK_FLAG(rnh->flags, ZEBRA_NHT_CONNECTED)) SET_FLAG(rnh->flags, ZEBRA_NHT_CONNECTED); - else if (!flags && CHECK_FLAG(rnh->flags, ZEBRA_NHT_CONNECTED)) + else if (!connected + && CHECK_FLAG(rnh->flags, ZEBRA_NHT_CONNECTED)) UNSET_FLAG(rnh->flags, ZEBRA_NHT_CONNECTED); if (resolve_via_default) @@ -1265,13 +1266,13 @@ static void zread_rnh_unregister(ZAPI_HANDLER_ARGS) s = msg; while (l < hdr->length) { - uint8_t flags; + uint8_t ignore; - STREAM_GETC(s, flags); - if (flags != 0) + STREAM_GETC(s, ignore); + if (ignore != 0) goto stream_failure; - STREAM_GETC(s, flags); - if (flags != 0) + STREAM_GETC(s, ignore); + if (ignore != 0) goto stream_failure; STREAM_GETW(s, p.family); |
