diff options
| author | Daniel Walton <dwalton@cumulusnetworks.com> | 2017-06-30 17:52:56 +0000 |
|---|---|---|
| committer | Daniel Walton <dwalton@cumulusnetworks.com> | 2017-06-30 17:52:56 +0000 |
| commit | 1161690b93b48fbd07f4ee25c1261574db8d71c5 (patch) | |
| tree | 7ffbe5c3b333b1fe0b8a3f042d8b1af602d48019 /lib/bfd.c | |
| parent | ab782c96f881b1fdd59f52ba972cd82b5eeadc66 (diff) | |
| parent | 5fca4e3635c2778e8349bce0eaf944c26913d321 (diff) | |
Merge branch 'master' of https://github.com/dwalton76/frr into bgpd-ipv4-plus-label-misc3
Conflicts:
bgpd/bgp_route.c
Diffstat (limited to 'lib/bfd.c')
| -rw-r--r-- | lib/bfd.c | 25 |
1 files changed, 11 insertions, 14 deletions
@@ -93,12 +93,9 @@ bfd_validate_param(struct vty *vty, const char *dm_str, const char *rx_str, const char *tx_str, u_int8_t *dm_val, u_int32_t *rx_val, u_int32_t *tx_val) { - VTY_GET_INTEGER_RANGE ("detect-mul", *dm_val, dm_str, - BFD_MIN_DETECT_MULT, BFD_MAX_DETECT_MULT); - VTY_GET_INTEGER_RANGE ("min-rx", *rx_val, rx_str, - BFD_MIN_MIN_RX, BFD_MAX_MIN_RX); - VTY_GET_INTEGER_RANGE ("min-tx", *tx_val, tx_str, - BFD_MIN_MIN_TX, BFD_MAX_MIN_TX); + *dm_val = strtoul(dm_str, NULL, 10); + *rx_val = strtoul(rx_str, NULL, 10); + *tx_val = strtoul(tx_str, NULL, 10); return CMD_SUCCESS; } @@ -397,11 +394,11 @@ bfd_show_param(struct vty *vty, struct bfd_info *bfd_info, int bfd_tag, } else { - vty_out (vty, " %s%sDetect Mul: %d, Min Rx interval: %d," - " Min Tx interval: %d%s", + vty_outln (vty, " %s%sDetect Mul: %d, Min Rx interval: %d," + " Min Tx interval: %d", (extra_space) ? " ": "", (bfd_tag) ? "BFD: " : " ", bfd_info->detect_mult, bfd_info->required_min_rx, - bfd_info->desired_min_tx, VTY_NEWLINE); + bfd_info->desired_min_tx); } } @@ -426,9 +423,9 @@ bfd_show_status(struct vty *vty, struct bfd_info *bfd_info, int bfd_tag, } else { - vty_out (vty, " %s%sStatus: %s, Last update: %s%s", + vty_outln (vty, " %s%sStatus: %s, Last update: %s", (extra_space) ? " ": "", (bfd_tag) ? "BFD: " : " ", - bfd_get_status_str(bfd_info->status), time_buf, VTY_NEWLINE); + bfd_get_status_str(bfd_info->status), time_buf); } } @@ -454,8 +451,8 @@ bfd_show_info(struct vty *vty, struct bfd_info *bfd_info, int multihop, } else { - vty_out (vty, " %sBFD: Type: %s%s", (extra_space) ? " " : "", - (multihop) ? "multi hop" : "single hop", VTY_NEWLINE); + vty_outln (vty, " %sBFD: Type: %s", (extra_space) ? " " : "", + (multihop) ? "multi hop" : "single hop"); } bfd_show_param(vty, bfd_info, 0, extra_space, use_json, json_bfd); @@ -464,7 +461,7 @@ bfd_show_info(struct vty *vty, struct bfd_info *bfd_info, int multihop, if (use_json) json_object_object_add(json_obj, "peerBfdInfo", json_bfd); else - vty_out (vty, "%s", VTY_NEWLINE); + vty_out (vty, VTYNL); } /* |
