Change in vdsm[master]: Improve the validation of netmask and gateway
wudxw at linux.vnet.ibm.com
wudxw at linux.vnet.ibm.com
Thu Nov 29 06:04:09 UTC 2012
Mark Wu has posted comments on this change.
Change subject: Improve the validation of netmask and gateway
......................................................................
Patch Set 5: (1 inline comment)
....................................................
File vdsm/configNetwork.py
Line 715: if not _validateIpAddress(netmask):
Line 716: raise ConfigNetworkError(ne.ERR_BAD_ADDR,
Line 717: "Bad netmask: %r" % netmask)
Line 718:
Line 719: num = _dottedQuadToNum(netmask)
Cool! Thanks for teaching how to handle to handle binary in python. I will update it in next patch.
Line 720: if num & (num - 1) != (num << 1) & 0xffffffff:
Line 721: raise ConfigNetworkError(ne.ERR_BAD_ADDR, "Bad netmask: %r" % netmask)
Line 722:
Line 723:
--
To view, visit http://gerrit.ovirt.org/7713
To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: comment
Gerrit-Change-Id: I3c0a39f3f681a9e587f9118246e42a29e18d604b
Gerrit-PatchSet: 5
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Mark Wu <wudxw at linux.vnet.ibm.com>
Gerrit-Reviewer: Antoni Segura Puimedon <asegurap at redhat.com>
Gerrit-Reviewer: Dan Kenigsberg <danken at redhat.com>
Gerrit-Reviewer: Hunt Xu <mhuntxu at gmail.com>
Gerrit-Reviewer: Mark Wu <wudxw at linux.vnet.ibm.com>
Gerrit-Reviewer: oVirt Jenkins CI Server
More information about the vdsm-patches
mailing list