Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

service tcp all #15

Open
mjardeli opened this issue May 6, 2017 · 0 comments
Open

service tcp all #15

mjardeli opened this issue May 6, 2017 · 0 comments

Comments

@mjardeli
Copy link

mjardeli commented May 6, 2017

Hi Martin,
This one I correcting manually as it is stopping parse when it find a case like this. I ll leave as suggestion for future if possible.

Trying to parse the following service group:

object-group service DM_INLINE_SERVICE_8
 service-object tcp 
object-group service DM_INLINE_SERVICE_9
 service-object udp 

parse output:

Traceback (most recent call last):
  File "c2c.py", line 171, in <module>
    c2c.importConfig(args.cpPortsFile,args.cpNetObjFile,args.ciscoFile)
  File "lib/cisco2checkpoint.py", line 1758, in importConfig
    self._importPortGroups(self.parser.getPortGroups())
  File "lib/cisco2checkpoint.py", line 1842, in _importPortGroups
    self.addObj(CiscoServiceGroup(self, newGrp))
  File "lib/cisco2checkpoint.py", line 1062, in __init__
    for mm_r in parsedObj.result_dict:
  File "lib/ciscoconfparse_patch.py", line 500, in result_dict
    .format(obj.text))
ValueError: [FATAL] models_asa cannot parse ' service-object tcp '

My suggestion for tcp/udp is to replace with following:

object-group service tcp_all tcp
 port-object range 1 65535
object-group service udp_all udp
 port-object range 1 65535

I saw there is an ANY_ on config.py, but not sure how can I add tcp or udp.

thanks,

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant