Skip to content

Fix local IP addr lookup#17

Open
cFire wants to merge 1 commit into
metal3d:masterfrom
cFire:master
Open

Fix local IP addr lookup#17
cFire wants to merge 1 commit into
metal3d:masterfrom
cFire:master

Conversation

@cFire
Copy link
Copy Markdown

@cFire cFire commented Apr 30, 2020

In cases where the default subnet for an IPv4 private network does not
match the locally configured subnet on the interface, the local IP lookup
would fail.

Example: local ip 10.0.0.100/24, but the default subnet for this private
range is 10.0.0.0/8.

It would also fail for any IPv6 lookups since no default mask is defined
for private IPv6 ranges.

This mehtod of checking if the target IP address lies within the subnet
configured on the interface fixes both of those problems by not reying
on the default subnet at all but by reading the configured subnet from
the interfaces.

In cases where the default subnet for an IPv4 private network does not
match the locally configured subnet on the interface, the local IP lookup
would fail.

Example: local ip 10.0.0.100/24, but the default subnet for this private
range is 10.0.0.0/8.

It would also fail for any IPv6 lookups since no default mask is defined
for private IPv6 ranges.

This mehtod of checking if the target IP address lies within the subnet
configured on the interface fixes both of those problems by not reying
on the default subnet at all but by reading the configured subnet from
the interfaces.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant