diff options
author | Stephen Worley <sworley@cumulusnetworks.com> | 2019-06-10 06:36:59 +0200 |
---|---|---|
committer | Stephen Worley <sworley@cumulusnetworks.com> | 2019-06-10 20:36:30 +0200 |
commit | ad9255f8feb75c021ad12a65f4dfa9015abb64e7 (patch) | |
tree | 08ed1aa73a698a02b95d53a7124babcd2d0c76c2 /pbrd/pbr_nht.c | |
parent | Merge pull request #4488 from donaldsharp/pim_solo (diff) | |
download | frr-ad9255f8feb75c021ad12a65f4dfa9015abb64e7.tar.xz frr-ad9255f8feb75c021ad12a65f4dfa9015abb64e7.zip |
pbrd: Set next/prev to NULL on cached nexthops
When we copy a new nexthop to cache and track, set its
next and prev pointers to NULL. We don't want those since
this is to be treated as a single nexthop.Other nexthops that
aren't in a group could hash to this nexthop so it doesn't
make sense to keep those pointers in the cache.
Signed-off-by: Stephen Worley <sworley@cumulusnetworks.com>
Diffstat (limited to 'pbrd/pbr_nht.c')
-rw-r--r-- | pbrd/pbr_nht.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/pbrd/pbr_nht.c b/pbrd/pbr_nht.c index fc78b8ed1..a6ee8bf01 100644 --- a/pbrd/pbr_nht.c +++ b/pbrd/pbr_nht.c @@ -66,6 +66,8 @@ static void *pbr_nhrc_hash_alloc(void *p) { struct nhrc *nhrc = XCALLOC(MTYPE_PBR_NHG, sizeof(struct nhrc)); nhrc->nexthop = *(struct nexthop *)p; + nhrc->nexthop.next = NULL; + nhrc->nexthop.prev = NULL; return nhrc; } |