1
0
mirror of https://github.com/kellyjonbrazil/jc.git synced 2025-07-17 01:32:37 +02:00

strip interface value

This commit is contained in:
Kelly Brazil
2021-04-20 21:52:39 -07:00
parent 5be615a97e
commit b133d1f90d

View File

@ -138,7 +138,7 @@ Examples:
"action_direction": "IN",
"index": 5,
"network_protocol": "ipv4",
"to_interface": "en0 ",
"to_interface": "en0",
"to_ip": "10.10.10.10",
"to_subnet": 32,
"to_transport": "any",
@ -247,7 +247,7 @@ Examples:
"action_direction": "IN",
"index": "5",
"network_protocol": "ipv4",
"to_interface": "en0 ",
"to_interface": "en0",
"to_ip": "10.10.10.10",
"to_subnet": "32",
"to_transport": "any",
@ -346,7 +346,7 @@ def _parse_to_from(linedata, direction, rule_obj=None):
linedata_list = linedata.split(' on ', maxsplit=1)
if len(linedata_list) > 1:
rule_obj[direction + '_interface'] = linedata_list[1]
rule_obj[direction + '_interface'] = linedata_list[1].strip()
linedata = linedata_list[0]
else:
rule_obj[direction + '_interface'] = 'any'