-
Notifications
You must be signed in to change notification settings - Fork 351
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
firewall: T4694: Adding rt ipsec exists/missing match to firewall con…
…figs (#3616) * Change ipsec match-ipsec/none to match-ipsec-in and match-none-in for fw rules * Add ipsec match-ipsec-out and match-none-out * Change all the points where the match-ipsec.xml.i include was used before, making sure the new includes (match-ipsec-in/out.xml.i) are used appropriately. There were a handful of spots where match-ipsec.xml.i had snuck back in for output hooked chains already (the common-rule-* includes) * Add the -out generators to rendered templates * Heavy modification to firewall config validators: * I needed to check for ipsec-in matches no matter how deeply nested under an output-hook chain(via jump-target) - this always generates an error. * Ended up retrofitting the jump-targets validator from root chains and for named custom chains. It checks for recursive loops and improper IPsec matches. * Added "test_ipsec_metadata_match" and "test_cyclic_jump_validation" smoketests
- Loading branch information
Showing
17 changed files
with
264 additions
and
29 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
21 changes: 21 additions & 0 deletions
21
interface-definitions/include/firewall/match-ipsec-in.xml.i
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
<!-- include start from firewall/match-ipsec-in.xml.i --> | ||
<node name="ipsec"> | ||
<properties> | ||
<help>Inbound IPsec packets</help> | ||
</properties> | ||
<children> | ||
<leafNode name="match-ipsec-in"> | ||
<properties> | ||
<help>Inbound traffic that was IPsec encapsulated</help> | ||
<valueless/> | ||
</properties> | ||
</leafNode> | ||
<leafNode name="match-none-in"> | ||
<properties> | ||
<help>Inbound traffic that was not IPsec encapsulated</help> | ||
<valueless/> | ||
</properties> | ||
</leafNode> | ||
</children> | ||
</node> | ||
<!-- include end --> |
21 changes: 21 additions & 0 deletions
21
interface-definitions/include/firewall/match-ipsec-out.xml.i
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
<!-- include start from firewall/match-ipsec-out.xml.i --> | ||
<node name="ipsec"> | ||
<properties> | ||
<help>Outbound IPsec packets</help> | ||
</properties> | ||
<children> | ||
<leafNode name="match-ipsec-out"> | ||
<properties> | ||
<help>Outbound traffic to be IPsec encapsulated</help> | ||
<valueless/> | ||
</properties> | ||
</leafNode> | ||
<leafNode name="match-none-out"> | ||
<properties> | ||
<help>Outbound traffic that will not be IPsec encapsulated</help> | ||
<valueless/> | ||
</properties> | ||
</leafNode> | ||
</children> | ||
</node> | ||
<!-- include end --> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,21 +1,33 @@ | ||
<!-- include start from firewall/match-ipsec.xml.i --> | ||
<node name="ipsec"> | ||
<properties> | ||
<help>Inbound IPsec packets</help> | ||
<help>IPsec encapsulated packets</help> | ||
</properties> | ||
<children> | ||
<leafNode name="match-ipsec"> | ||
<leafNode name="match-ipsec-in"> | ||
<properties> | ||
<help>Inbound IPsec packets</help> | ||
<help>Inbound traffic that was IPsec encapsulated</help> | ||
<valueless/> | ||
</properties> | ||
</leafNode> | ||
<leafNode name="match-none"> | ||
<leafNode name="match-none-in"> | ||
<properties> | ||
<help>Inbound non-IPsec packets</help> | ||
<help>Inbound traffic that was not IPsec encapsulated</help> | ||
<valueless/> | ||
</properties> | ||
</leafNode> | ||
<leafNode name="match-ipsec-out"> | ||
<properties> | ||
<help>Outbound traffic to be IPsec encapsulated</help> | ||
<valueless/> | ||
</properties> | ||
</leafNode> | ||
<leafNode name="match-none-out"> | ||
<properties> | ||
<help>Outbound traffic that will not be IPsec encapsulated</help> | ||
<valueless/> | ||
</properties> | ||
</leafNode> | ||
</children> | ||
</node> | ||
<!-- include end --> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
<!-- include start from include/version/firewall-version.xml.i --> | ||
<syntaxVersion component='firewall' version='16'></syntaxVersion> | ||
<syntaxVersion component='firewall' version='17'></syntaxVersion> | ||
<!-- include end --> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.