Re: Need to support CIDR prefix at Add iSCSI target setup

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Sat, 23 Jun 2007 01:26:33 +0900
HARA Hiroshi <hhara@xxxxxxxxxxxxxxxx> wrote:

> Hi, David
> 
> David Cantrell wrote:
> > On Fri, 22 Jun 2007 23:21:08 +0900
> > HARA Hiroshi <hhara@xxxxxxxxxxxxxxxx> wrote:
> > 
> >> After I sent you the netconfig_dialog.py.diff yesterday,
> >> I think that it is better that anaconda supports
> >> CIDR prefix at Add iSCSI target setup.
> >> (I'm sorry for bothering you.)
> >>
> >> Would you review my additional patch, please ?
> > 
> > There's been a lot of outside work on this area of anaconda lately, which is great.  I just committed some other changes to the netconfig_dialog.py file earlier.
> > 
> > Regarding your patch... I made the following changes when applying it:
> > 
> > 1) Changed Netmask to 'IPv4 Network Mask' in dialog box titles.
> > 2) When you use prefix2netmask to convert the prefix to a netmask, you forget to set it in netdev (and sanity check it), so I added that.
> so, about 2) "sanity check" is also needed?
> so also attached patch is also useful ?

No, it's not.  What you've added to network_gui.py works fine, but is unnecessary.  You are converting the prefix to a netmask, sanity checking that, and then changing the input field to that netmask.  The sanity check for a prefix entry happens in the main block of the if test.  All that has to happen is make sure it's an int between 0 and 32 inclusive.  If that passes, we know we have valid input to pass to prefix2netmask.

In netconfig_dialog, now that I look at it, the sanity check of the converted netmask that I added is just as pointless.  We've already checked the range for the prefix, so we just need to pass it to prefix2netmask and then set that in netdev.

Sorry for the confusion.  I misread the block of code you were modifying.

Thanks for the patches.

-- 
David Cantrell <dcantrell@xxxxxxxxxx>
Red Hat / Westford, MA

Attachment: pgpu3e17bXoLU.pgp
Description: PGP signature


[Index of Archives]     [Kickstart]     [Fedora Users]     [Fedora Legacy List]     [Fedora Maintainers]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [Yosemite Photos]     [KDE Users]     [Fedora Tools]
  Powered by Linux