Skip to content
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

pf: reply-to not set for IPv6 GW #4494

Closed
kulikov-a opened this issue Dec 1, 2020 · 1 comment
Closed

pf: reply-to not set for IPv6 GW #4494

kulikov-a opened this issue Dec 1, 2020 · 1 comment
Assignees
Labels
bug Production bug

Comments

@kulikov-a
Copy link
Member

kulikov-a commented Dec 1, 2020

Important notices
Before you add a new report, we ask you kindly to acknowledge the following:

[-] I have read the contributing guide lines at https://github.com/opnsense/core/blob/master/CONTRIBUTING.md

[-] I have searched the existing issues and I'm convinced that mine is new.

Describe the bug
Hello everybody.
I noticed that for rules with a permitted reply-to directive, this directive is not set for the corresponding rule in rule.debug with the inet6 protocol.
Is that what you intended? If so, please explain why?
This can be easily fixed in the Gateways.php getInterfaceGateway function:
before (set only ipv4 gw name):
// The interface might have a gateway configured
if (isset($this->configHandle->interfaces->$interface)) {
$intf_gateway = $this->configHandle->interfaces->$interface->gateway;
} else {
$intf_gateway = null;
}
after (set gw name according to ip ver):
// The interface might have a gateway configured
if (isset($this->configHandle->interfaces->$interface)) {
if ($ipproto == "inet") {
$intf_gateway = $this->configHandle->interfaces->$interface->gateway;
} else {
$intf_gateway = $this->configHandle->interfaces->$interface->gatewayv6;
}
} else {
$intf_gateway = null;
}

Thanks!

Environment
Software version used and hardware type if relevant.
e.g.:

OPNsense 20.7.4

@AdSchellevis AdSchellevis self-assigned this Dec 1, 2020
@AdSchellevis AdSchellevis added the bug Production bug label Dec 1, 2020
@AdSchellevis
Copy link
Member

@kulikov-a looks like a bug to me, 80d7eb0 should fix it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Production bug
Development

No branches or pull requests

2 participants