]> git.puffer.fish Git - mirror/frr.git/commitdiff
eigrpd: Cleanup the merge
authorDonald Sharp <sharpd@cumulusnetworks.com>
Thu, 6 Apr 2017 01:01:31 +0000 (21:01 -0400)
committerDonald Sharp <sharpd@cumulusnetworks.com>
Thu, 6 Apr 2017 01:01:31 +0000 (21:01 -0400)
Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
eigrpd/eigrp_filter.c
eigrpd/eigrp_hello.c
eigrpd/eigrp_neighbor.c
eigrpd/eigrp_packet.c
eigrpd/eigrp_update.c
eigrpd/eigrp_vty.c
eigrpd/eigrp_zebra.c
lib/Makefile.am

index aaac379d9b2a4fb4888adbdc394a583932e2c55a..b36d0fbc9b32b04bcb65f00f5442ceb13867f358 100644 (file)
@@ -186,7 +186,7 @@ eigrp_distribute_update (struct distribute *dist)
          return;
     }
 
-  ifp = if_lookup_by_name (dist->ifname);
+  ifp = if_lookup_by_name (dist->ifname, VRF_DEFAULT);
   if (ifp == NULL)
     return;
 
index 0071c2c6a7546f4be079574bedbff0a027c3e7a6..81bc408b6a18e7b5c11d24fd0794bc9e29040fdc 100644 (file)
@@ -152,7 +152,7 @@ eigrp_hello_parameter_decode (struct eigrp_neighbor *nbr,
       if (eigrp_nbr_state_get(nbr) == EIGRP_NEIGHBOR_DOWN)
        {
          zlog_info("Neighbor %s (%s) is pending: new adjacency",
-                   inet_ntoa(nbr->src), ifindex2ifname(nbr->ei->ifp->ifindex));
+                   inet_ntoa(nbr->src), ifindex2ifname(nbr->ei->ifp->ifindex, VRF_DEFAULT));
 
          /* Expedited hello sent */
            eigrp_hello_send(nbr->ei, EIGRP_HELLO_NORMAL, NULL);
@@ -170,13 +170,13 @@ eigrp_hello_parameter_decode (struct eigrp_neighbor *nbr,
          if ((param->K1 & param->K2 & param->K3 & param->K4 & param->K5) == 255)
            {
               zlog_info ("Neighbor %s (%s) is down: Interface PEER-TERMINATION received",
-                         inet_ntoa (nbr->src),ifindex2ifname (nbr->ei->ifp->ifindex));
+                         inet_ntoa (nbr->src),ifindex2ifname (nbr->ei->ifp->ifindex, VRF_DEFAULT));
               eigrp_nbr_delete (nbr);
            }
          else
            {
               zlog_info ("Neighbor %s (%s) going down: Kvalue mismatch",
-                         inet_ntoa (nbr->src),ifindex2ifname (nbr->ei->ifp->ifindex));
+                         inet_ntoa (nbr->src),ifindex2ifname (nbr->ei->ifp->ifindex, VRF_DEFAULT));
               eigrp_nbr_state_set(nbr, EIGRP_NEIGHBOR_DOWN);
            }
        }
@@ -250,7 +250,7 @@ eigrp_peer_termination_decode (struct eigrp_neighbor *nbr,
        if(my_ip == received_ip)
        {
                zlog_info ("Neighbor %s (%s) is down: Peer Termination received",
-                               inet_ntoa (nbr->src),ifindex2ifname (nbr->ei->ifp->ifindex));
+                          inet_ntoa (nbr->src),ifindex2ifname (nbr->ei->ifp->ifindex, VRF_DEFAULT));
                /* set neighbor to DOWN */
                nbr->state = EIGRP_NEIGHBOR_DOWN;
                /* delete neighbor */
@@ -325,7 +325,7 @@ eigrp_hello_receive (struct eigrp *eigrp, struct ip *iph, struct eigrp_header *e
   
   if (IS_DEBUG_EIGRP_PACKET(eigrph->opcode - 1, RECV))
     zlog_debug("Processing Hello size[%u] int(%s) nbr(%s)",
-              size, ifindex2ifname(nbr->ei->ifp->ifindex), 
+              size, ifindex2ifname(nbr->ei->ifp->ifindex, VRF_DEFAULT), 
               inet_ntoa(nbr->src));
 
   size -= EIGRP_HEADER_LEN;
index 8dcf76dc47385853973c92a553c07c8b16169abc..f03b9ff4db6e53cac9a5483e06efd789b2f72f6b 100644 (file)
@@ -209,7 +209,7 @@ holddown_timer_expired (struct thread *thread)
   nbr = THREAD_ARG (thread);
 
   zlog_info ("Neighbor %s (%s) is down: holding time expired",
-            inet_ntoa(nbr->src), ifindex2ifname(nbr->ei->ifp->ifindex));
+            inet_ntoa(nbr->src), ifindex2ifname(nbr->ei->ifp->ifindex, VRF_DEFAULT));
   nbr->state = EIGRP_NEIGHBOR_DOWN;
   eigrp_nbr_delete (nbr);
 
@@ -364,15 +364,15 @@ void eigrp_nbr_hard_restart(struct eigrp_neighbor *nbr, struct vty *vty)
        }
 
        zlog_debug ("Neighbor %s (%s) is down: manually cleared",
-                       inet_ntoa (nbr->src),
-                       ifindex2ifname (nbr->ei->ifp->ifindex));
+                   inet_ntoa (nbr->src),
+                   ifindex2ifname (nbr->ei->ifp->ifindex, VRF_DEFAULT));
        if(vty != NULL)
        {
                vty_time_print (vty, 0);
                vty_out (vty, "Neighbor %s (%s) is down: manually cleared%s",
-                               inet_ntoa (nbr->src),
-                               ifindex2ifname (nbr->ei->ifp->ifindex),
-                               VTY_NEWLINE);
+                        inet_ntoa (nbr->src),
+                        ifindex2ifname (nbr->ei->ifp->ifindex, VRF_DEFAULT),
+                        VTY_NEWLINE);
        }
 
        /* send Hello with Peer Termination TLV */
index 75be2eff3d90ac407b227b6086b839e15cb3cb06..ef69933255fe655a6c98e74dbf00dee883b18d16 100644 (file)
@@ -523,7 +523,7 @@ eigrp_read (struct thread *thread)
       /* Handle cases where the platform does not support retrieving the ifindex,
         and also platforms (such as Solaris 8) that claim to support ifindex
         retrieval but do not. */
-      c = if_lookup_address((void *)&iph->ip_src, VRF_DEFAULT);
+      c = if_lookup_address((void *)&iph->ip_src, AF_INET, VRF_DEFAULT);
 
       if (c == NULL)
        return 0;
@@ -784,7 +784,7 @@ eigrp_recv_packet (int fd, struct interface **ifp, struct stream *ibuf)
 
   ifindex = getsockopt_ifindex(AF_INET, &msgh);
 
-  *ifp = if_lookup_by_index(ifindex);
+  *ifp = if_lookup_by_index(ifindex, VRF_DEFAULT);
 
   if (ret != ip_len)
     {
index 6857b53a6cf7c5066852d2e67bfd86f2213e294d..85fa43230841a866a326db06529776bcc6e334f7 100644 (file)
@@ -203,7 +203,7 @@ eigrp_update_receive (struct eigrp *eigrp, struct ip *iph, struct eigrp_header *
   nbr->recv_sequence_number = ntohl(eigrph->sequence);
   if (IS_DEBUG_EIGRP_PACKET(0, RECV))
     zlog_debug("Processing Update size[%u] int(%s) nbr(%s) seq [%u] flags [%0x]",
-               size, ifindex2ifname(nbr->ei->ifp->ifindex),
+               size, ifindex2ifname(nbr->ei->ifp->ifindex, VRF_DEFAULT),
                inet_ntoa(nbr->src),
                nbr->recv_sequence_number, flags);
 
@@ -213,7 +213,7 @@ eigrp_update_receive (struct eigrp *eigrp, struct ip *iph, struct eigrp_header *
        /* Graceful restart Update received with all routes */
 
                zlog_info("Neighbor %s (%s) is resync: peer graceful-restart",
-                                 inet_ntoa(nbr->src), ifindex2ifname(nbr->ei->ifp->ifindex));
+                         inet_ntoa(nbr->src), ifindex2ifname(nbr->ei->ifp->ifindex, VRF_DEFAULT));
 
                /* get all prefixes from neighbor from topology table */
        nbr_prefixes = eigrp_neighbor_prefixes_lookup(eigrp, nbr);
@@ -225,7 +225,7 @@ eigrp_update_receive (struct eigrp *eigrp, struct ip *iph, struct eigrp_header *
        /* Graceful restart Update received, routes also in next packet */
 
                zlog_info("Neighbor %s (%s) is resync: peer graceful-restart",
-                                 inet_ntoa(nbr->src), ifindex2ifname(nbr->ei->ifp->ifindex));
+                         inet_ntoa(nbr->src), ifindex2ifname(nbr->ei->ifp->ifindex, VRF_DEFAULT));
 
                /* get all prefixes from neighbor from topology table */
        nbr_prefixes = eigrp_neighbor_prefixes_lookup(eigrp, nbr);
@@ -277,10 +277,10 @@ eigrp_update_receive (struct eigrp *eigrp, struct ip *iph, struct eigrp_header *
             eigrp_topology_neighbor_down(nbr->ei->eigrp,nbr);
             nbr->recv_sequence_number = ntohl(eigrph->sequence);
             zlog_info("Neighbor %s (%s) is down: peer restarted",
-                      inet_ntoa(nbr->src), ifindex2ifname(nbr->ei->ifp->ifindex));
+                      inet_ntoa(nbr->src), ifindex2ifname(nbr->ei->ifp->ifindex, VRF_DEFAULT));
             eigrp_nbr_state_set(nbr, EIGRP_NEIGHBOR_PENDING);
             zlog_info("Neighbor %s (%s) is pending: new adjacency",
-                      inet_ntoa(nbr->src), ifindex2ifname(nbr->ei->ifp->ifindex));
+                      inet_ntoa(nbr->src), ifindex2ifname(nbr->ei->ifp->ifindex, VRF_DEFAULT));
             eigrp_update_send_init(nbr);
           }
     }
@@ -1089,21 +1089,21 @@ eigrp_update_send_GR (struct eigrp_neighbor *nbr, enum GR_type gr_type, struct v
        {
                /* function was called after applying filtration */
                zlog_info("Neighbor %s (%s) is resync: route configuration changed",
-                                 inet_ntoa(nbr->src), ifindex2ifname(nbr->ei->ifp->ifindex));
+                         inet_ntoa(nbr->src), ifindex2ifname(nbr->ei->ifp->ifindex, VRF_DEFAULT));
        }
        else if(gr_type == EIGRP_GR_MANUAL)
        {
                /* Graceful restart was called manually */
                zlog_info("Neighbor %s (%s) is resync: manually cleared",
-                                 inet_ntoa(nbr->src), ifindex2ifname(nbr->ei->ifp->ifindex));
+                         inet_ntoa(nbr->src), ifindex2ifname(nbr->ei->ifp->ifindex, VRF_DEFAULT));
 
                if(vty != NULL)
                {
                        vty_time_print (vty, 0);
                        vty_out (vty, "Neighbor %s (%s) is resync: manually cleared%s",
-                                       inet_ntoa (nbr->src),
-                                       ifindex2ifname (nbr->ei->ifp->ifindex),
-                                       VTY_NEWLINE);
+                                inet_ntoa (nbr->src),
+                                ifindex2ifname (nbr->ei->ifp->ifindex, VRF_DEFAULT),
+                                VTY_NEWLINE);
                }
        }
 
index 61a173292310113b22e2d2b353915e13f18dbf70..9f199b6918f10876738d9fb864d1f829f125c8f9 100644 (file)
@@ -1200,11 +1200,11 @@ DEFUN (clear_ip_eigrp_neighbors,
             {
               zlog_debug ("Neighbor %s (%s) is down: manually cleared",
                           inet_ntoa (nbr->src),
-                          ifindex2ifname (nbr->ei->ifp->ifindex));
+                          ifindex2ifname (nbr->ei->ifp->ifindex, VRF_DEFAULT));
               vty_time_print (vty, 0);
               vty_out (vty, "Neighbor %s (%s) is down: manually cleared%s",
                        inet_ntoa (nbr->src),
-                       ifindex2ifname (nbr->ei->ifp->ifindex),
+                       ifindex2ifname (nbr->ei->ifp->ifindex, VRF_DEFAULT),
                        VTY_NEWLINE);
 
               /* set neighbor to DOWN */
@@ -1263,11 +1263,11 @@ DEFUN (clear_ip_eigrp_neighbors_int,
         {
           zlog_debug ("Neighbor %s (%s) is down: manually cleared",
                       inet_ntoa (nbr->src),
-                      ifindex2ifname (nbr->ei->ifp->ifindex));
+                      ifindex2ifname (nbr->ei->ifp->ifindex, VRF_DEFAULT));
           vty_time_print (vty, 0);
           vty_out (vty, "Neighbor %s (%s) is down: manually cleared%s",
                    inet_ntoa (nbr->src),
-                   ifindex2ifname (nbr->ei->ifp->ifindex),
+                   ifindex2ifname (nbr->ei->ifp->ifindex, VRF_DEFAULT),
                    VTY_NEWLINE);
 
           /* set neighbor to DOWN */
index 6f38079f696c02a77b8ae499972caba011bed387..0c99fd5a55b993c12715b2a59208a4e80ef464ba 100644 (file)
@@ -399,7 +399,8 @@ zebra_interface_if_lookup (struct stream *s)
 
   /* And look it up. */
   return if_lookup_by_name_len (ifname_tmp,
-                               strnlen (ifname_tmp, INTERFACE_NAMSIZ));
+                               strnlen (ifname_tmp, INTERFACE_NAMSIZ),
+                               VRF_DEFAULT);
 }
 
 void
index c4989c73c999d22ccd89511f38daede88b25db9e..c33893be6af7cd6b6f759d53db7c06362d513bcd 100644 (file)
@@ -32,7 +32,7 @@ libfrr_la_SOURCES = \
        libfrr.c \
        strlcpy.c \
        strlcat.c \
-       sha256.c
+       sha256.c \
        module.c \
        hook.c \
        # end