Mark Wu has posted comments on this change.

Change subject: Improve the validation of netmask and gateway
......................................................................


Patch Set 4: (2 inline comments)

....................................................
File vdsm/configNetwork.py
Line 713:     if not _validateIpAddress(gateway):
Line 714:         raise ConfigNetworkError(ne.ERR_BAD_ADDR,
Line 715:                                  "Bad gateway: %r" % gateway)
Line 716: 
Line 717:     else:
ok, I like your suggestion and will update it until we get agreement on the 
problem in line 720.
Line 718:         (gw, ip, mask) = [_dottedQuadToNum(addr) for addr
Line 719:                           in (gateway, ipaddr, netmask)]
Line 720:         if ip & mask != gw & mask:
Line 721:             raise ConfigNetworkError(ne.ERR_BAD_ADDR,


Line 716: 
Line 717:     else:
Line 718:         (gw, ip, mask) = [_dottedQuadToNum(addr) for addr
Line 719:                           in (gateway, ipaddr, netmask)]
Line 720:         if ip & mask != gw & mask:
Currently vdsm only allows to configure one gateway, the system-wide default 
one. So the given gateway is not in the same subnet as the ip address 
configured, the host can't find a route rule to reach the gateway even they're 
in the same LAN physically.
Line 721:             raise ConfigNetworkError(ne.ERR_BAD_ADDR,
Line 722:                                      "Bad gateway: %r" % gateway)
Line 723: 
Line 724: 


--
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: 4
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Mark Wu <[email protected]>
Gerrit-Reviewer: Antoni Segura Puimedon <[email protected]>
Gerrit-Reviewer: Dan Kenigsberg <[email protected]>
Gerrit-Reviewer: Mark Wu <[email protected]>
Gerrit-Reviewer: oVirt Jenkins CI Server
_______________________________________________
vdsm-patches mailing list
[email protected]
https://lists.fedorahosted.org/mailman/listinfo/vdsm-patches

Reply via email to