haykeh / capirca

Automatically exported from code.google.com/p/capirca
Apache License 2.0
0 stars 0 forks source link

Multiprotocol terms ignore protocol in service definiations #11

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Create a service destination with multiple protocols
FOO = 10123/tcp 10456/udp

2. Create a term that references the service and lists multiple protocols
term test {
  destination-port:: FOO
  protocol:: tcp
  protocol:: udp
  action:: accept
}

3. Generate filters
python aclgen.py

What is the expected output? What do you see instead?

I would expect to see something like (using Cisco ACLs in this example):
  remark test
   permit tcp any any eq 10123
   permit udp any any eq 10456

Instead I see the following (both ports used with both protocols)
  remark test
   permit tcp any any eq 10123
   permit udp any any eq 10123
   permit tcp any any eq 10456
   permit udp any any eq 10456

What version of the product are you using? On what operating system?
Capirca SVN r92 - Mac OS X 10.6.3

Please provide any additional information below.

The selection of tcp or udp ports form a service definition that includes
both appears to work fine when a single protocol is specified in the term.

Original issue reported on code.google.com by matt.ste...@gmail.com on 24 May 2010 at 10:37

GoogleCodeExporter commented 9 years ago

Original comment by watson@google.com on 12 Jul 2011 at 7:42

GoogleCodeExporter commented 9 years ago
A patch has been integrated that generates a warning message during compiling 
for mismatches between services and protocols.

Patch was submitted as:
http://code.google.com/p/capirca/source/detail?r=142

Original comment by watson on 18 Aug 2011 at 1:03