Feature #7603
closedChange type of 'network' in 'networks' table to IP4R
100%
Description
Currently, the network
is of type varchar
. It would be nice to use some other type, such as iprange
.
Updated by Rajmund Hruška about 2 years ago
- Tracker changed from Bug to Feature
- Status changed from New to In Progress
- % Done changed from 0 to 70
It's actually quite simple to change the type to ip4r
.
The only issue is that according to ipranges
195.113.144.130/28
is a valid record whereas according to ip4r
it is not. So searching for such addresses results in internal server error.
Updated by Rajmund Hruška about 2 years ago
As Pavel Kácha noticed, timeline
and events
handle the aforementioned type of addresses, the phrase "Invalid address value xxx in search form." is written on the screen. I checked the code and the validation is not actually performed before the form is submitted, although it might seem like it is. In dispatch_request
method, there is a try-catch
block which handles the exception from the database. I don't like this approach and I would much rather check the value before posting request. I will probably go with high
and low
functions from ipranges
and convert the value to range.
Updated by Rajmund Hruška about 2 years ago
- Subject changed from Consider migration of 'network' in 'networks' table to Change type of 'network' in 'networks' table to IP4R
- Status changed from In Progress to Resolved
- % Done changed from 70 to 100
Rajmund Hruska wrote in #note-2:
As Pavel Kácha noticed,
timeline
andevents
handle the aforementioned type of addresses, the phrase "Invalid address value xxx in search form." is written on the screen. I checked the code and the validation is not actually performed before the form is submitted, although it might seem like it is. Indispatch_request
method, there is atry-catch
block which handles the exception from the database. I don't like this approach and I would much rather check the value before posting request. I will probably go withhigh
andlow
functions fromipranges
and convert the value to range.
Fixed in dd0502fd.
So I think this is done.
Updated by Rajmund Hruška about 2 years ago
- Status changed from Resolved to In Review
Merged into devel.
Updated by Rajmund Hruška almost 2 years ago
- Status changed from In Review to Closed