Moti Asayag has posted comments on this change.

Change subject: engine: Block multicast MAC addresses for vNICs
......................................................................


Patch Set 1:

(5 comments)

....................................................
File 
backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/network/MacPoolManager.java
Line 23: import org.ovirt.engine.core.utils.log.LogFactory;
Line 24: 
Line 25: public class MacPoolManager {
Line 26: 
Line 27:     private static final String MAC_ADDRESS_MULTICAST_MSB = 
"13579bBdDfF";
Done
Line 28:     private static final int HEX_RADIX = 16;
Line 29:     private static final String INIT_ERROR_MSG = "{0}: Error in 
initializing MAC Addresses pool manager.";
Line 30:     private static final MacPoolManager INSTANCE = new 
MacPoolManager();
Line 31: 


Line 173:         for (int j = 0; j < value.length(); j += 2) {
Line 174:             String group = value.substring(j, j + 2);
Line 175: 
Line 176:             // skip multi-cast MAC Addresses
Line 177:             if (j == 0) {
Done
Line 178:                 if (StringUtils.contains(MAC_ADDRESS_MULTICAST_MSB, 
group.charAt(1))) {
Line 179:                     return null;
Line 180:                 }
Line 181:             }


....................................................
File 
backend/manager/modules/common/src/main/java/org/ovirt/engine/core/common/businessentities/network/VmNic.java
Line 13: /**
Line 14:  * <code>VmNic</code> defines a type of {@link NetworkInterface} for 
instances of {@link VM}.
Line 15:  */
Line 16: public class VmNic extends NetworkInterface<VmNetworkStatistics> {
Line 17:     public static final String UNICAST_MAC_ADDRESS_FORMAT = 
"[a-fA-F0-9][02468aAcCeE](:[a-fA-F0-9]{2}){5}";
Done
Line 18: 
Line 19:     private static final long serialVersionUID = 7428150502868988886L;
Line 20: 
Line 21:     protected static final String 
VALIDATION_MESSAGE_MAC_ADDRESS_NOT_NULL =


....................................................
File 
backend/manager/modules/common/src/main/java/org/ovirt/engine/core/common/utils/ValidationUtils.java
Line 24
Line 25
Line 26
Line 27
Line 28
Done


....................................................
File 
frontend/webadmin/modules/uicommonweb/src/main/java/org/ovirt/engine/ui/uicommonweb/models/vms/VmInterfaceModel.java
Line 356: 
Line 357:         getMAC().setIsValid(true);
Line 358:         if (getMAC().getIsChangable())
Line 359:         {
Line 360:             getMAC().validateEntity(new IValidation[] { new 
NotEmptyValidation(), new MacAddressValidation(), });
Done
Line 361:         }
Line 362: 
Line 363:         return getName().getIsValid() && getNicType().getIsValid()
Line 364:                 && getMAC().getIsValid();


-- 
To view, visit http://gerrit.ovirt.org/19805
To unsubscribe, visit http://gerrit.ovirt.org/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: Ida4082be249391494053b56540d5458fecec65da
Gerrit-PatchSet: 1
Gerrit-Project: ovirt-engine
Gerrit-Branch: master
Gerrit-Owner: Moti Asayag <masa...@redhat.com>
Gerrit-Reviewer: Daniel Erez <de...@redhat.com>
Gerrit-Reviewer: Lior Vernia <lver...@redhat.com>
Gerrit-Reviewer: Mike Kolesnik <mkole...@redhat.com>
Gerrit-Reviewer: Moti Asayag <masa...@redhat.com>
Gerrit-Reviewer: oVirt Jenkins CI Server
Gerrit-HasComments: Yes
_______________________________________________
Engine-patches mailing list
Engine-patches@ovirt.org
http://lists.ovirt.org/mailman/listinfo/engine-patches

Reply via email to