Commit f2ec3a6
Correctly validate subnet arguments when using a subnetpool
When creating a subnet using a subnetpool, we were
failing to validate all the passed API arguments in
the dictionary, leading to a case where you could
specify an invalid DNS nameserver. For example,
using an IPv4 nameserver on an IPv6 subnet. This
could cause daemons the l3-agent starts, like radvd,
to fail to start correctly, leading to a loss of
connectivity.
Specifying a subnet by cidr without a subnetpool
did already correctly fail with an IP version
mismatch error, this is just an edge case that
was never tested.
Since _validate_subnet() was called in so many places
it was moved to a common location and is only not
called for IPv6 prefix-delegation subnets.
Closes-bug: #2036877
Change-Id: I6302e9a373cf93e706cec10f87c3beaf632a0391
(cherry picked from commit 2f91d33)1 parent a28ec9e commit f2ec3a6
File tree
2 files changed
+61
-11
lines changed- neutron
- db
- tests/unit/db
2 files changed
+61
-11
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
318 | 318 | | |
319 | 319 | | |
320 | 320 | | |
321 | | - | |
| 321 | + | |
322 | 322 | | |
323 | 323 | | |
324 | 324 | | |
| |||
330 | 330 | | |
331 | 331 | | |
332 | 332 | | |
333 | | - | |
| 333 | + | |
334 | 334 | | |
335 | 335 | | |
336 | 336 | | |
| |||
607 | 607 | | |
608 | 608 | | |
609 | 609 | | |
| 610 | + | |
| 611 | + | |
| 612 | + | |
| 613 | + | |
610 | 614 | | |
611 | 615 | | |
| 616 | + | |
612 | 617 | | |
613 | 618 | | |
614 | 619 | | |
615 | 620 | | |
616 | 621 | | |
617 | 622 | | |
618 | 623 | | |
619 | | - | |
| 624 | + | |
620 | 625 | | |
621 | 626 | | |
622 | 627 | | |
| |||
640 | 645 | | |
641 | 646 | | |
642 | 647 | | |
643 | | - | |
644 | | - | |
645 | | - | |
646 | | - | |
647 | | - | |
648 | | - | |
| 648 | + | |
| 649 | + | |
| 650 | + | |
| 651 | + | |
| 652 | + | |
| 653 | + | |
| 654 | + | |
649 | 655 | | |
650 | 656 | | |
651 | 657 | | |
| |||
698 | 704 | | |
699 | 705 | | |
700 | 706 | | |
701 | | - | |
| 707 | + | |
702 | 708 | | |
703 | 709 | | |
704 | 710 | | |
| |||
860 | 866 | | |
861 | 867 | | |
862 | 868 | | |
| 869 | + | |
863 | 870 | | |
864 | 871 | | |
865 | 872 | | |
| |||
868 | 875 | | |
869 | 876 | | |
870 | 877 | | |
871 | | - | |
872 | 878 | | |
873 | 879 | | |
874 | 880 | | |
875 | 881 | | |
| 882 | + | |
876 | 883 | | |
877 | 884 | | |
878 | 885 | | |
879 | 886 | | |
880 | 887 | | |
| 888 | + | |
| 889 | + | |
881 | 890 | | |
882 | 891 | | |
883 | 892 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
6641 | 6641 | | |
6642 | 6642 | | |
6643 | 6643 | | |
| 6644 | + | |
| 6645 | + | |
| 6646 | + | |
| 6647 | + | |
| 6648 | + | |
| 6649 | + | |
| 6650 | + | |
| 6651 | + | |
| 6652 | + | |
| 6653 | + | |
| 6654 | + | |
| 6655 | + | |
| 6656 | + | |
| 6657 | + | |
| 6658 | + | |
| 6659 | + | |
| 6660 | + | |
| 6661 | + | |
| 6662 | + | |
| 6663 | + | |
| 6664 | + | |
| 6665 | + | |
| 6666 | + | |
| 6667 | + | |
| 6668 | + | |
| 6669 | + | |
| 6670 | + | |
| 6671 | + | |
| 6672 | + | |
| 6673 | + | |
| 6674 | + | |
| 6675 | + | |
| 6676 | + | |
| 6677 | + | |
| 6678 | + | |
| 6679 | + | |
| 6680 | + | |
| 6681 | + | |
| 6682 | + | |
| 6683 | + | |
| 6684 | + | |
6644 | 6685 | | |
6645 | 6686 | | |
6646 | 6687 | | |
| |||
0 commit comments