-
Notifications
You must be signed in to change notification settings - Fork 881
Firewall: Rules [new]: Fix handling of interfacenot, evaluate as floating rules in correct prio_group #9426
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Changes from all commits
b987638
df0c802
27dd202
c564d45
e6c13f3
44cea6b
d4c4a65
9951b13
8f152d9
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
|
@@ -109,8 +109,12 @@ public function getPriority() | |||||||||||||||
| { | ||||||||||||||||
| $configObj = Config::getInstance()->object(); | ||||||||||||||||
| $interface = $this->interface->getValue(); | ||||||||||||||||
| if (strpos($interface, ',') !== false || empty($interface)) { | ||||||||||||||||
| // floating (multiple interfaces involved) | ||||||||||||||||
| if ( | ||||||||||||||||
| // floating: empty, multiple, or inverted interface | ||||||||||||||||
| (string)$this->interfacenot === "1" || | ||||||||||||||||
| (strpos($interface, ",")) !== false || | ||||||||||||||||
| empty($interface) | ||||||||||||||||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. this doesn't seem to match our actual sorting core/src/etc/inc/filter.lib.inc Lines 675 to 681 in c6eaefc
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. be0b18930f36f9 says it's a floating rule pinned to one interface so this seems correct?
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I changed the file a bit in 37e5056 5100521 For now we should limit floating to this condition and keep sorting single-floating rules to their interface-specific ordering location The whole floating concept needs to die and adapting it further will just play ping pong with rules that work how they work given their current ordering (if it's correct or not is debatable)
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. There are no single interface floating rules possible here. The condition right now should be correct.
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Kinda, but only inverted single interface ones, which counts as multiple interfaces implicitely? I guess inverting "LAN" makes it an infinite set of interfaces that exludes LAN, which counts as multiple?
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. true. given that the situation is what it is right now and we don't have any reports -- fixing a spot and missing several others is going to make it worse likely. |
||||||||||||||||
| ) { | ||||||||||||||||
| return 200000; | ||||||||||||||||
| } elseif ( | ||||||||||||||||
| !empty($configObj->interfaces) && | ||||||||||||||||
|
|
||||||||||||||||
Uh oh!
There was an error while loading. Please reload this page.