← Back to team overview

yahoo-eng-team team mailing list archive

[Bug 1805991] Re: IP Route: subnet's host_houtes attribute and router's routes accept the invalidate subnets.

 

Reviewed:  https://review.openstack.org/623415
Committed: https://git.openstack.org/cgit/openstack/neutron-lib/commit/?id=7da36840989c29d27903283785fdc7b8723b5ecc
Submitter: Zuul
Branch:    master

commit 7da36840989c29d27903283785fdc7b8723b5ecc
Author: longqianzhao <longqian.zhao@xxxxxxxxx>
Date:   Sat Dec 8 00:23:37 2018 +0800

    Modify the judgment method of CIDR and Add utests
    
    The routing table could not add information, because
    the original method could not identify the invalid CIDR.
    This patch modify the judgement method. It will help
    the router working normally.
    
    Co-Authored-By: Allain Legacy <Allain.legacy@xxxxxxxxxxxxx>
    
    Change-Id: I4db2e35303492aeda7e14cf9d525cc9b4a54ac36
    Closes-Bug: #1805991
    Story: 2004567


** Changed in: neutron
       Status: In Progress => Fix Released

-- 
You received this bug notification because you are a member of Yahoo!
Engineering Team, which is subscribed to neutron.
https://bugs.launchpad.net/bugs/1805991

Title:
  IP Route: subnet's host_houtes attribute and router's routes accept
  the invalidate subnets.

Status in neutron:
  Fix Released

Bug description:
  Bug Description

  	Description:
  	The type:hostroutes validator is not properly validating subnets that have non-zero values in the host portion of the network address (e.g., 1.2.3.1/24 rather than 1.2.3.0/24). This can cause issues for backends/drivers that assume that the data coming down from the server is valid.
  	For example, using those values with the Linux command line utilities will result in an error:
  	
  	$ sudo ip route add 192.0.2.5/24 via 192.168.1.2 
  	RTNETLINK answers: Invalid argument
  	
  	But using the correct network address value results in a successful operation:
  	$ sudo ip route add 192.0.2.0/24 via 192.168.1.2
  	
  	The issue can be reproduced on the latest devstack
  	
  	Version: openstack_latest in latest devstack
  	
  	scenario 1: subnet's host_routes
  	Steps to reproduce:
  	1. create network
  		$ openstack network create TestNet
  	
  	2. create subnet
  		$ openstack subnet create TestSubnet --host-route destination=10.10.10.1/24,gateway=10.10.10.1 --network=TestNet --subnet-range 10.10.10.0/24
  		Expected output:'10.10.10.1/24' isn't a recognized IP subnet cidr, '10.10.10.0/24' is recommended.
  		Actual output: success
  	
  	scenario 2: router's routes
  	Steps to reproduce:
  	1. create router
  		$ openstack router create TestRouter
  	
  	2. add subnet to router
  		$ openstack router add subnet TestRouter TestSubnet
  		
  	3. set the router
  		$ openstack router set --route destination=10.10.10.1/24,gateway=10.10.10.17 TestRouter
  		Expected output:'10.10.10.1/24' isn't a recognized IP subnet cidr, '10.10.10.0/24' is recommended.
  		Actual output: success

To manage notifications about this bug go to:
https://bugs.launchpad.net/neutron/+bug/1805991/+subscriptions


References