Merge pull request #2225 from rusaksoft/iptables-add-icmp-type

Iptables add icmp type
reviewable/pr18780/r1
Adrian Likins 9 years ago
commit ae6b3ac71d

@ -266,6 +266,13 @@ options:
description: description:
- "Specifies the error packet type to return while rejecting." - "Specifies the error packet type to return while rejecting."
required: false required: false
icmp_type:
version_added: "2.2"
description:
- "This allows specification of the ICMP type, which can be a numeric ICMP type,
type/code pair, or one of the ICMP type names shown by the command
'iptables -p icmp -h'"
required: false
''' '''
EXAMPLES = ''' EXAMPLES = '''
@ -342,6 +349,7 @@ def construct_rule(params):
append_param(rule, params['uid_owner'], '--uid-owner', False) append_param(rule, params['uid_owner'], '--uid-owner', False)
append_jump(rule, params['reject_with'], 'REJECT') append_jump(rule, params['reject_with'], 'REJECT')
append_param(rule, params['reject_with'], '--reject-with', False) append_param(rule, params['reject_with'], '--reject-with', False)
append_param(rule, params['icmp_type'], '--icmp-type', False)
return rule return rule
@ -399,6 +407,7 @@ def main():
limit_burst=dict(required=False, default=None, type='str'), limit_burst=dict(required=False, default=None, type='str'),
uid_owner=dict(required=False, default=None, type='str'), uid_owner=dict(required=False, default=None, type='str'),
reject_with=dict(required=False, default=None, type='str'), reject_with=dict(required=False, default=None, type='str'),
icmp_type=dict(required=False, default=None, type='str'),
), ),
mutually_exclusive=( mutually_exclusive=(
['set_dscp_mark', 'set_dscp_mark_class'], ['set_dscp_mark', 'set_dscp_mark_class'],

Loading…
Cancel
Save