-
Notifications
You must be signed in to change notification settings - Fork 16
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
Support for CIDR address format #26
Comments
Hi,
Does using the CIDR add some useful information ? Should we do something
with it instead of just ignoring it ?
…--
/*
** "What do you despise? By this you are truly known."
** from Manual of Muad'Dib by the Princess Irulan.
*/
On Fri, Feb 23, 2018 at 1:55 PM, dimagafurov ***@***.***> wrote:
In Debian 9 Stretch it is possible to set up addresses in CIDR format.
Example
iface eth0 inet static
address 192.168.99.1/24
gateway 192.168.99.1
name eth0
instead of:
iface eth0 inet static
address 192.168.99.1
netmask 255.255.255.0
gateway 192.168.99.1
name eth0
Debinterfaces currently does not support this and it gives ValueError on
validating IP addres when trying to parse interfaces file
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
<#26>, or mute the thread
<https://github.com/notifications/unsubscribe-auth/AA-fUYuTAhlUzOrjGMji4aRoa__F2wONks5tXrVEgaJpZM4SQ16c>
.
|
Hi, |
That's what I thought too, just wanted to be sure.
So the big issue is whether to :
- accept IPs in CIDR format and handle them everywhere in the code
- convert CIDR into 'classic' address + netmask
At first glance, it seems to me the second solution may better help
Debinterface's users by shielding them from the CIDR format if they don't
expect it. What do you think ?
Besides, do you know what happens if there are both CIDR and netmask ?
Should we raise a ValueError on this one ?
Thanks,
Nathan
…--
/*
** "What do you despise? By this you are truly known."
** from Manual of Muad'Dib by the Princess Irulan.
*/
On Fri, Feb 23, 2018 at 3:09 PM, dimagafurov ***@***.***> wrote:
Hi,
It doesn't add any useful information, it is absolutely equivalent to
format with separate address and netmask.
But it breaks down the cases when we need to parse interface file
generated by some other software. For example, Debian Stretch Installer
writes interfaces file in CIDR format.
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#26 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AA-fUT-J_dFTNYPi08dhwUVhzdJI9ZGqks5tXsaxgaJpZM4SQ16c>
.
|
I think the second solution is just enough - convert CIDR into 'classic' address + netmask, as I don't see any difference in system behavior depending of address format.
I will test it in an hour or two and write here |
According to the manpage we can use address as
If both "classic" and CIDR format present it uses |
I made quick and ugly workaround for my purposes, it is completely not production-ready but maybe it will be useful |
Many thanks for the researches !
I don't have much free time in the next 2-3 weeks, but if you have I'll
deploy the new release right away.
…--
/*
** "What do you despise? By this you are truly known."
** from Manual of Muad'Dib by the Princess Irulan.
*/
On Fri, Feb 23, 2018 at 5:49 PM, dimagafurov ***@***.***> wrote:
I made quick and ugly workaround for my purposes, it is completely not
production-ready but maybe it will be useful
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#26 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AA-fUUzM425QK5X9q3xYG6EItTNXeD_Pks5tXuwhgaJpZM4SQ16c>
.
|
The package |
Hi @guedressel , I don't want to add a dependency if I can help it, as this library is used in some places where disk space and internet access is limited. It aso add synchronisation costs with the netaddr library, even if it's quite stable at this point. I'm open to discussion though ! |
In Debian 9 Stretch it is possible to set up addresses in CIDR format.
Example
instead of:
Debinterfaces currently does not support this and it gives
ValueError
on validating IP addres when trying to parse interfaces fileThe text was updated successfully, but these errors were encountered: