Page MenuHomeFreeBSD

Fix issue with RACK/BBR when VIMAGE is enabled

Authored by tuexen on Jul 18 2021, 10:01 AM.



CURVNET_RESTORE expands to multiple expressions. So enclose it in curly brackets when used in an if statement.

Diff Detail

R10 FreeBSD src repository
Lint Skipped
Unit Tests Skipped

Event Timeline

why not fix curvnet macros?

In D31212#702735, @mjg wrote:

why not fix curvnet macros?

Are they broken? I guess you can change them for CURVNET_RESTORE, but not for CURVNET_SET. So I guess they are done this way for consistency... But I don't know for sure, since I did not invent them...

The man page explicitly state that

if (condition)

will not work, but it does not say anything regarding CURVNET_RESTORE.

This revision is now accepted and ready to land.Jul 19 2021, 6:26 PM

The need to guard their use with { } is most definitely a bug and will keep tripping people over.

Looking at the code I have to say I don't see a fix which does not induce churn. If the set/restore macros took an argument we would be set, but it's definitely not something I'm going to spend time on nor will demand someone else does.