Commit 97fa24e
committed
zebra: Fix leaked nhe
During route processing in zebra, Zebra will create a nexthop
group that matches the nexthops passed down from the routing
protocol. Then Zebra will look to see if it can re-use a
nhe from a previous version of the route entry( say a interface
goes down ). If Zebra decides to re-use an nhe it was just dropping
the route entry created. Which led to nexthop group's that had
a refcount of 0 and in some cases these nexthop groups were installed
into the kernel.
Add a bit of code to see if the returned entry is not being used
and it has no reference count and if so, properly dispose of it.
Signed-off-by: Donald Sharp <[email protected]>1 parent 465d286 commit 97fa24e
1 file changed
+14
-5
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3089 | 3089 | | |
3090 | 3090 | | |
3091 | 3091 | | |
3092 | | - | |
| 3092 | + | |
3093 | 3093 | | |
3094 | 3094 | | |
3095 | 3095 | | |
| |||
3143 | 3143 | | |
3144 | 3144 | | |
3145 | 3145 | | |
| 3146 | + | |
| 3147 | + | |
3146 | 3148 | | |
3147 | 3149 | | |
3148 | 3150 | | |
3149 | 3151 | | |
3150 | 3152 | | |
3151 | 3153 | | |
3152 | | - | |
3153 | | - | |
3154 | | - | |
3155 | | - | |
| 3154 | + | |
| 3155 | + | |
| 3156 | + | |
| 3157 | + | |
| 3158 | + | |
| 3159 | + | |
| 3160 | + | |
| 3161 | + | |
| 3162 | + | |
| 3163 | + | |
| 3164 | + | |
3156 | 3165 | | |
3157 | 3166 | | |
3158 | 3167 | | |
| |||
0 commit comments