radvd-project / radvd

radvd | Official repository: https://github.com/radvd-project/radvd
https://radvd.litech.org/
Other
203 stars 107 forks source link

send: refactor prefix lifetime limiter #154

Closed robbat2 closed 3 years ago

robbat2 commented 3 years ago

In PR#127, I suggested that the block of code to limit prefix lifetimes be refactored and reused. In implementing that I wonder if we're clobbering some stored prefix lifetimes in some cases and accidently having a time-bomb behavior. PR needs strong review & testing.

Reference: https://github.com/radvd-project/radvd/pull/127#discussion_r606072523 Signed-off-by: Robin H. Johnson robbat2@gentoo.org

robbat2 commented 3 years ago

CC @samboyles1 I implemented the helper function, and now I really wonder about a subtle class of bugs in radvd where some data might be clobbered. Would appreciate review from you as well as others.

samboyles1 commented 3 years ago

Thanks @robbat2, I will do some testing and review tomorrow the way I initially did my testing with #127

samboyles1 commented 3 years ago

@robbat2 it looks as though the lifetimes are being sent as I had expected in #127 with your additional change. Would you be able to explain a bit more about what data you think might get clobbered, Is it the lifetime information from radvd.conf? Or do you have a specific case in mind that might cause the issues to occur?

robbat2 commented 3 years ago

@stappersg does this look correct enough to you?