Skip to content

Commit

Permalink
Cosmetical changes. Disabled the function to prevent overlapping tilfas.
Browse files Browse the repository at this point in the history
Will check production code and see how it is handled.
  • Loading branch information
sachinites committed Jan 8, 2020
1 parent c67918f commit 2afe6a3
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 14 deletions.
12 changes: 8 additions & 4 deletions complete_spf_path.c
Original file line number Diff line number Diff line change
Expand Up @@ -285,10 +285,14 @@ print_sr_tunnel_paths(glthread_t *path, void *arg){
}

static void
construct_spf_path_recursively(node_t *spf_root, glthread_t *spf_predecessors,
LEVEL level, nh_type_t nh, glthread_t *path,
spf_path_processing_fn_ptr fn_ptr, void *fn_ptr_arg,
boolean is_post_conv_path){
construct_spf_path_recursively(node_t *spf_root,
glthread_t *spf_predecessors,
LEVEL level,
nh_type_t nh,
glthread_t *path,
spf_path_processing_fn_ptr fn_ptr,
void *fn_ptr_arg,
boolean is_post_conv_path){

glthread_t *curr = NULL;
pred_info_t *pred_info = NULL;
Expand Down
2 changes: 1 addition & 1 deletion instanceconst.h
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@
#define MAX_NODE_INTF_SLOTS 20
#define PREFIX_LEN 15
#define PREFIX_LEN_WITH_MASK (PREFIX_LEN + 3)
#define MAX_NXT_HOPS 8
#define MAX_NXT_HOPS 16
#define INFINITE_METRIC (0xFE000000)
#define LINK_DEFAULT_METRIC 10
#define DEFAULT_LINK_BW 1 /*1GIG*/
Expand Down
20 changes: 11 additions & 9 deletions tilfa.c
Original file line number Diff line number Diff line change
Expand Up @@ -781,7 +781,7 @@ tilfa_does_nexthop_overlap2(internal_nh_t *one_nh,
internal_nh_t **nh_lst){

int i = 0;

return FALSE;
for(; i < MAX_NXT_HOPS; i++){

if(!nh_lst[i]) return FALSE;
Expand Down Expand Up @@ -867,6 +867,7 @@ tilfa_compute_first_hop_segments(node_t *spf_root,
if(tilfa_does_nexthop_overlap2(first_hop_segment,
first_hop_segments)) /*This needs to be addressed, incompatible arg passed*/
continue;

first_hop_segments[n++] = first_hop_segment;
if(n == MAX_NXT_HOPS) return n;
}
Expand Down Expand Up @@ -1559,6 +1560,7 @@ tilfa_is_fhs_overlap(

int i;

return FALSE;
for(i = 0; i < count; i++){

if(gen_segment_list->oif ==
Expand All @@ -1570,16 +1572,16 @@ tilfa_is_fhs_overlap(

static void
tilfa_merge_tilfa_segment_lists_by_destination(
tilfa_segment_list_t *src,
tilfa_segment_list_t *dst){

tilfa_segment_list_t temp;
memset(&temp, 0, sizeof(tilfa_segment_list_t));
tilfa_segment_list_t *dst,
tilfa_segment_list_t *src){

int i = 0,
j = 0;

tilfa_segment_list_t *array[] = {src, dst};
tilfa_segment_list_t temp;
memset(&temp, 0, sizeof(tilfa_segment_list_t));

tilfa_segment_list_t *array[] = {dst, src};

int k = 0;
/*copy all RSVP LSP FHS to temp*/
Expand Down Expand Up @@ -1630,9 +1632,9 @@ tilfa_merge_tilfa_segment_lists_by_destination(
}
}
}
memcpy(src->gen_segment_list, temp.gen_segment_list,
memcpy(dst->gen_segment_list, temp.gen_segment_list,
sizeof(temp.gen_segment_list));
src->n_segment_list = j;
dst->n_segment_list = j;
}

static void
Expand Down

0 comments on commit 2afe6a3

Please sign in to comment.