]> git.puffer.fish Git - matthieu/frr.git/commitdiff
Merge pull request #7261 from Niral-Networks/niral_dev_vrf_ospf6
authorRafael Zalamena <rzalamena@users.noreply.github.com>
Tue, 3 Nov 2020 14:59:38 +0000 (11:59 -0300)
committerGitHub <noreply@github.com>
Tue, 3 Nov 2020 14:59:38 +0000 (11:59 -0300)
ospf6d : Transformation changes for ospf6 vrf support.

13 files changed:
1  2 
ospf6d/ospf6_abr.c
ospf6d/ospf6_area.c
ospf6d/ospf6_asbr.c
ospf6d/ospf6_interface.c
ospf6d/ospf6_intra.c
ospf6d/ospf6_lsa.h
ospf6d/ospf6_message.c
ospf6d/ospf6_network.c
ospf6d/ospf6_network.h
ospf6d/ospf6_route.c
ospf6d/ospf6_spf.c
ospf6d/ospf6_top.c
ospf6d/ospf6_zebra.c

index cbb80b668ddd616f2f72396463113b16c87b7a25,204056120a4f372ef0317ffa2e5139f8023a5824..f087289df657d60416844640a82b7db041db1e0b
@@@ -358,12 -372,13 +361,12 @@@ int ospf6_abr_originate_summary_to_area
                if (range && !CHECK_FLAG(range->flag, OSPF6_ROUTE_REMOVE)
                    && (route->path.area_id != OSPF_AREA_BACKBONE
                        || !IS_AREA_TRANSIT(area))) {
 -                      if (is_debug) {
 -                              prefix2str(&range->prefix, buf, sizeof(buf));
 -                              zlog_debug("Suppressed by range %s of area %s",
 -                                         buf, route_area->name);
 -                      }
 +                      if (is_debug)
 +                              zlog_debug(
 +                                      "Suppressed by range %pFX of area %s",
 +                                      &range->prefix, route_area->name);
                        ospf6_abr_delete_route(route, summary, summary_table,
-                                              old);
+                                              old, area->ospf6);
                        return 0;
                }
        }
@@@ -805,9 -835,10 +811,9 @@@ void ospf6_abr_old_route_remove(struct 
                                                   old->nh_list ? listcount(
                                                           old->nh_list)
                                                                : 0);
 -                              }
  
                                if (table->hook_add)
-                                       (*table->hook_add)(old);
+                                       (*table->hook_add)(old, ospf6);
  
                                if ((old->path.origin.id == lsa->header->id) &&
                                    (old->path.origin.adv_router
Simple merge
Simple merge
Simple merge
index 733b9cffb115ea227b7968c6721e5494fdf2f751,15bfabb75d835f4f55aa9efae2a3ff5e3c5dfd72..2102afd84401435974535e6e16b8f818d4d72935
@@@ -984,10 -985,12 +984,10 @@@ int ospf6_intra_prefix_lsa_originate_st
                /* connected prefix to advertise */
                for (route = ospf6_route_head(oi->route_connected); route;
                     route = ospf6_route_best_next(route)) {
 -                      if (IS_OSPF6_DEBUG_ORIGINATE(INTRA_PREFIX)) {
 -                              prefix2str(&route->prefix, buf, sizeof(buf));
 -                              zlog_debug("    include %s", buf);
 -                      }
 +                      if (IS_OSPF6_DEBUG_ORIGINATE(INTRA_PREFIX))
 +                              zlog_debug("    include %pFX", &route->prefix);
                        ospf6_route_add(ospf6_route_copy(route),
-                                       route_advertise);
+                                       route_advertise, oa->ospf6);
                }
        }
  
@@@ -1251,10 -1255,13 +1251,11 @@@ int ospf6_intra_prefix_lsa_originate_tr
                        route->path.area_id = oi->area->area_id;
                        route->path.type = OSPF6_PATH_TYPE_INTRA;
  
 -                      if (IS_OSPF6_DEBUG_ORIGINATE(INTRA_PREFIX)) {
 -                              prefix2str(&route->prefix, buf, sizeof(buf));
 -                              zlog_debug("    include %s", buf);
 -                      }
 +                      if (IS_OSPF6_DEBUG_ORIGINATE(INTRA_PREFIX))
 +                              zlog_debug("    include %pFX", &route->prefix);
  
-                       ospf6_route_add(route, route_advertise);
+                       ospf6_route_add(route, route_advertise,
+                                       oi->area->ospf6);
                        prefix_num--;
                }
                if (current != end && IS_OSPF6_DEBUG_ORIGINATE(INTRA_PREFIX))
Simple merge
Simple merge
Simple merge
index 0ec7975e14dd98347ec1f41a72f39e5affed00d4,56a73fe25f96fb0b3870e396f069be6a3035bc6a..08d8be4445d5bf73805cfdb5b1ae522b2f023e23
@@@ -26,13 -26,12 +26,14 @@@ extern struct in6_addr alldrouters6
  
  extern int ospf6_serv_sock(struct ospf6 *ospf6);
  extern void ospf6_serv_close(int *ospf6_sock);
- extern int ospf6_sso(ifindex_t ifindex, struct in6_addr *group, int option);
+ extern int ospf6_sso(ifindex_t ifindex, struct in6_addr *group, int option,
+                    int sockfd);
  
 -extern int ospf6_sendmsg(struct in6_addr *, struct in6_addr *, ifindex_t *,
 -                       struct iovec *, int ospf6_sock);
 -extern int ospf6_recvmsg(struct in6_addr *, struct in6_addr *, ifindex_t *,
 -                       struct iovec *, int ospf6_sock);
 +extern int ospf6_sendmsg(struct in6_addr *src, struct in6_addr *dst,
 +                       ifindex_t ifindex, struct iovec *message,
 +                       int ospf6_sock);
 +extern int ospf6_recvmsg(struct in6_addr *src, struct in6_addr *dst,
 +                       ifindex_t *ifindex, struct iovec *message,
 +                       int ospf6_sock);
  
  #endif /* OSPF6_NETWORK_H */
Simple merge
Simple merge
Simple merge
index c5c8ca27b9f35655de2219e51dc0764a7f228143,6ab6153798c0a8b78635b800ddbbaebab8274364..b6c712176a5b4d8eea39d37c718233c56dee2c82
@@@ -210,9 -261,11 +249,10 @@@ DEFUN (show_zebra
  
  #define ADD    0
  #define REM    1
- static void ospf6_zebra_route_update(int type, struct ospf6_route *request)
+ static void ospf6_zebra_route_update(int type, struct ospf6_route *request,
+                                    struct ospf6 *ospf6)
  {
        struct zapi_route api;
 -      char buf[PREFIX2STR_BUFFER];
        int nhcount;
        int ret = 0;
        struct prefix *dest;
        return;
  }
  
- void ospf6_zebra_route_update_add(struct ospf6_route *request)
+ void ospf6_zebra_route_update_add(struct ospf6_route *request,
+                                 struct ospf6 *ospf6)
  {
-       ospf6_zebra_route_update(ADD, request);
+       ospf6_zebra_route_update(ADD, request, ospf6);
  }
  
- void ospf6_zebra_route_update_remove(struct ospf6_route *request)
+ void ospf6_zebra_route_update_remove(struct ospf6_route *request,
+                                    struct ospf6 *ospf6)
  {
-       ospf6_zebra_route_update(REM, request);
+       ospf6_zebra_route_update(REM, request, ospf6);
  }
  
- void ospf6_zebra_add_discard(struct ospf6_route *request)
+ void ospf6_zebra_add_discard(struct ospf6_route *request, struct ospf6 *ospf6)
  {
        struct zapi_route api;
 -      char buf[INET6_ADDRSTRLEN];
        struct prefix *dest = &request->prefix;
  
        if (!CHECK_FLAG(request->flag, OSPF6_ROUTE_BLACKHOLE_ADDED)) {
        }
  }
  
- void ospf6_zebra_delete_discard(struct ospf6_route *request)
+ void ospf6_zebra_delete_discard(struct ospf6_route *request,
+                               struct ospf6 *ospf6)
  {
        struct zapi_route api;
 -      char buf[INET6_ADDRSTRLEN];
        struct prefix *dest = &request->prefix;
  
        if (CHECK_FLAG(request->flag, OSPF6_ROUTE_BLACKHOLE_ADDED)) {