Feature #7603
closed
Change type of 'network' in 'networks' table to IP4R
Added by Rajmund Hruška about 2 years ago.
Updated almost 2 years ago.
Category:
Development - Database
Description
Currently, the network
is of type varchar
. It would be nice to use some other type, such as iprange
.
- 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.
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.
- 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
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.
Fixed in dd0502fd.
So I think this is done.
- Status changed from Resolved to In Review
- Status changed from In Review to Closed
Also available in: Atom
PDF