Skip to content

Commit

Permalink
Invert logic of Calico-specific tunnel route change check
Browse files Browse the repository at this point in the history
To improve clarity, as discussed in
#37 (comment)
  • Loading branch information
Neil Jerram committed May 15, 2017
1 parent ec13258 commit 79a25f8
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions sysdep/unix/krt.c
Original file line number Diff line number Diff line change
Expand Up @@ -743,10 +743,10 @@ krt_got_route(struct krt_proto *p, rte *e)
* for the route, generate KRF_UPDATE here so that the route gets
* updated to have the tunnel as its outgoing interface.
*/
if(strcmp(i->name, e->attrs->iface->name) || !ipa_equal(e->attrs->gw, new->attrs->orig_gw))
verdict = KRF_UPDATE;
else
if (!strcmp(i->name, e->attrs->iface->name) && ipa_equal(e->attrs->gw, new->attrs->orig_gw))
verdict = KRF_SEEN;
else
verdict = KRF_UPDATE;
}
else if(!krt_same_dest(e, new))
verdict = KRF_UPDATE;
Expand Down

0 comments on commit 79a25f8

Please sign in to comment.