OPNsense Forum

English Forums => Development and Code Review => Topic started by: lucifercipher on July 18, 2015, 08:04:07 pm

Title: [SOLVED] Critical Bug perhaps Franco?
Post by: lucifercipher on July 18, 2015, 08:04:07 pm
Hey bud,

Try to replicate this.

1. Create a VLAN
2. Assign Interface
3. Select the newly created interface "use logical name instead of VLAN primary from dropdown"
4. Click Apply

*Boom* OS dies completely, wont' reboot, won't let you reset to factory defaults. I tested three times with new installation testing and all came out with the same result.
Title: Re: Critical Bug perhaps Franco?
Post by: franco on July 19, 2015, 10:46:46 am
Thanks mate, I'll try to reproduce that.
Title: Re: Critical Bug perhaps Franco?
Post by: franco on August 05, 2015, 05:19:55 pm
I tried this to no avail (on 15.7.7). Can you give me a literal step-by-step guide to reproduce?
Title: Re: Critical Bug perhaps Franco?
Post by: lucifercipher on August 07, 2015, 08:06:42 pm
Here it is Franco. These are the three steps you can try to replicate the problem.

(http://i.imgur.com/BZ1BuUa.png)
Title: Re: Critical Bug perhaps Franco?
Post by: franco on August 07, 2015, 10:04:47 pm
Thanks mate, well this is an interesting tale... I wanted to reproduce but started to dig into why the interface name was truncated in the first place. Turns out that "netstat -inW" truncates interfaces to 7 characters, which completely trashes this use of netstat here. Furthermore, VLANs were supposed to be filtered out completely from that list, at least the ones that did not have a proper friendly name. Long story short:

https://github.com/opnsense/core/commit/b5daea15c7777f13221698bb4d30fc4757eac66c

Fixing the actual root cause, not the side effect. It's quite delicate, I'm keeping this on "opnsense-devel" for a version or two for testing. Thanks for locating this. :)
Title: Re: [SOLVED] Critical Bug perhaps Franco?
Post by: franco on August 07, 2015, 10:39:15 pm
To be fair, this is a regression introduced by stripping a custom FreeBSD patch that changed netstat to widen the interface column. I think stripping such an obscure patch to go back to vanilla FreeBSD is worth it, especially if you think about portability. IMHO, bugs like that should never happen just because the base system "changes". FreeBSD is particularly picky about such regressions and flipping that around to digress from FreeBSD is, well, ironic.
Title: Re: [SOLVED] Critical Bug perhaps Franco?
Post by: lucifercipher on August 09, 2015, 09:21:52 pm
No worries matey and thanks for digging into it. Ill grab the raw util.inc  and rebuild to see if the netstat issue has gone away once you push the final changes after testing to the github.

Cheers.
Title: Re: [SOLVED] Critical Bug perhaps Franco?
Post by: guest7876 on August 15, 2015, 10:30:56 am
less patches to FreeBSD makes more sense even if it truncates the name.
Title: Re: [SOLVED] Critical Bug perhaps Franco?
Post by: franco on August 15, 2015, 11:32:39 am
Thanks, case in point it took less than two hours to adapt all the code to FreeBSD 10.2. I'm counting 5 larger patches that are not in FreeBSD, we'll work on trying to get them upstreamed as they do seem useful to a larger audience (pf Syntax improvements mostly).

The fix for this thread's problem is going to be in 15.7.9.