Subnet creation of 192.168.0/24 is accepted by neutron but incorrect subnet mask is used

Bug #1276750 reported by Colin MacGiollaEain
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenContrail
Fix Committed
Undecided
Hampapur Ajay

Bug Description

Hi,

A typo in creating a neutron subnet (192.168.0/24 instead of 192.168.0.0/24) caused issues as the parameter was accepted (insufficient validation?) but then the subnet mask offered via DHCP was a /32.

For many systems omission of the last dotted quad is implicitly accepted as a .0 e.g. 192.168.0/24 -> accepted as -> 192.168.0.0/24 - why did the subnet mask change from /24 to /32

Correcting this required deleting and recreating the subnet.

Rgds,
Colin

Tags: config
description: updated
description: updated
Revision history for this message
Praveen (praveen-karadakal) wrote :

When subnet is crated with following command,
quantum subnet-create 1a151cc5-dd75-4b6c-a256-5f608843dc83 192.168.0/24

It is observed that agent gets configuration as 192.168.0/24. Agent fails in parsing this address.
API server should validate the address and set the right value in configuration.

Snapshot of configuration in agent:

  type:virtual-network-network-ipam
   name:attr(default-domain:admin:vn3,default-domain:default-project:default-network-ipam)

   value
    ipam-subnets
     subnet
      ip-prefix:192.168.0

      ip-prefix-len:24

     default-gateway:192.168.0.254

Adjacencies:
 virtual-network default-domain:admin:vn3
 network-ipam default-domain:default-project:default-network-ipam

Changed in opencontrail:
assignee: nobody → Hampapur Ajay (hajay)
Revision history for this message
Hari Prasad Killi (haripk) wrote :

Fixed with commit 689cd006ed3d3f95473837083f4a3469324d7749.

Changed in opencontrail:
status: New → Fix Committed
tags: added: config
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.