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

23.05 Wrong route subnet calculation #17

Closed
1 task done
StifflersMom opened this issue Nov 14, 2023 · 1 comment
Closed
1 task done

23.05 Wrong route subnet calculation #17

StifflersMom opened this issue Nov 14, 2023 · 1 comment
Labels
bug Something isn't working

Comments

@StifflersMom
Copy link

StifflersMom commented Nov 14, 2023

Describe the bug

UCI, network:

config route
        option interface 'eth3_mgnt'
        option target '172.16.0.0/12'
        option gateway '10.20.30.41'

results to:

Destination     Gateway         Genmask         Flags Metric Ref    Use Iface
172.0.0.0       10.20.30.41     255.240.0.0     UG    0      0        0 eth3

OpenWrt version

r23497-6637af95aa

OpenWrt target/subtarget

x86/64

Device

AMI Corporation Aptio CRB

Image kind

Official downloaded image

Steps to reproduce

Add a route to 172.16.0.0/12 via UCI or LUCI

Actual behaviour

actually, the result is a route to 172.0.0.0/12 instead of 172.16.0.0/12

Expected behaviour

No response

Additional info

I'm sure, this bug comes with one of the latest updates because I had already installed 23.05 with functional routing

Diffconfig

No response

Terms

  • I am reporting an issue for OpenWrt, not an unsupported fork.
@StifflersMom StifflersMom added the bug Something isn't working label Nov 14, 2023
@jow-
Copy link
Contributor

jow- commented Nov 14, 2023

Indeed, that one is on me :/

@jow- jow- transferred this issue from openwrt/openwrt Nov 14, 2023
openwrt-bot pushed a commit to openwrt/openwrt that referenced this issue Nov 14, 2023
8587c074f1eb interface-ip: fix IPv4 route target masking

Fixes: openwrt/netifd#17
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
openwrt-bot pushed a commit to openwrt/openwrt that referenced this issue Nov 14, 2023
A previous commit supposed to mask out excess host bits in route targets
failed to correctly calculate the mask value, causing it to produce
improper results for certain mask lengths.

Fixes: openwrt/netifd#17
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
Vladdrako pushed a commit to Vladdrako/openwrt that referenced this issue Dec 4, 2023
8587c074f1eb interface-ip: fix IPv4 route target masking

Fixes: openwrt/netifd#17
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants