Commit db4940c
committed
server: avoid NPE updating a network ACL rule with no protocol
On a full (non-partial) network ACL item update, transferDataToNetworkAclRulePojo
clears the protocol to null before updateIcmpCodeAndTypeFullUpgrade runs, and
that method called networkACLItemVo.getProtocol().equalsIgnoreCase(...) on the
null protocol, throwing NullPointerException. A full upgrade with no protocol is
a valid input: the parameter is optional and the mode is meant to disregard the
current configuration. Compare against the constant first so a null protocol
falls through to clearing the icmp fields.1 parent 2cd8c5e commit db4940c
2 files changed
Lines changed: 14 additions & 1 deletion
File tree
- server/src
- main/java/com/cloud/network/vpc
- test/java/com/cloud/network/vpc
Lines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
946 | 946 | | |
947 | 947 | | |
948 | 948 | | |
949 | | - | |
| 949 | + | |
950 | 950 | | |
951 | 951 | | |
952 | 952 | | |
| |||
Lines changed: 13 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
45 | 45 | | |
46 | 46 | | |
47 | 47 | | |
| 48 | + | |
48 | 49 | | |
49 | 50 | | |
50 | 51 | | |
| |||
1506 | 1507 | | |
1507 | 1508 | | |
1508 | 1509 | | |
| 1510 | + | |
| 1511 | + | |
| 1512 | + | |
| 1513 | + | |
| 1514 | + | |
| 1515 | + | |
| 1516 | + | |
| 1517 | + | |
| 1518 | + | |
| 1519 | + | |
| 1520 | + | |
| 1521 | + | |
1509 | 1522 | | |
0 commit comments