]> git.puffer.fish Git - mirror/frr.git/commitdiff
bgpd: Logically dead code
authorDonald Sharp <sharpd@cumulusnetworks.com>
Sat, 26 Oct 2019 00:37:26 +0000 (20:37 -0400)
committerDonald Sharp <sharpd@cumulusnetworks.com>
Sat, 26 Oct 2019 00:42:21 +0000 (20:42 -0400)
SAFI_EVPN and SAFI_MPLSVPN have been excluded by previous
if statements.  This code is dead.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
bgpd/bgp_route.c

index de4f185ab2bfbfc09334e1e59b4f242f95c29397..af73a3afc428cc17bd74cd1833f86a8d8fddbd63 100644 (file)
@@ -7241,21 +7241,11 @@ void route_vty_out(struct vty *vty, struct prefix *p,
                if (json_paths) {
                        json_nexthop_global = json_object_new_object();
 
-                       if ((safi == SAFI_MPLS_VPN) || (safi == SAFI_EVPN))
-                               json_object_string_add(
-                                       json_nexthop_global,
-                                       nexthop_fqdn ? "fqdn" : "ip",
-                                       nexthop_fqdn
-                                               ? nexthop_fqdn
-                                               : inet_ntoa(
-                                                         attr->mp_nexthop_global_in));
-                       else
-                               json_object_string_add(
-                                       json_nexthop_global,
-                                       nexthop_fqdn ? "fqdn" : "ip",
-                                       nexthop_fqdn
-                                               ? nexthop_fqdn
-                                               : inet_ntoa(attr->nexthop));
+                       json_object_string_add(json_nexthop_global,
+                                              nexthop_fqdn ? "fqdn" : "ip",
+                                              nexthop_fqdn
+                                              ? nexthop_fqdn
+                                              : inet_ntoa(attr->nexthop));
 
                        json_object_string_add(json_nexthop_global, "afi",
                                               "ipv4");