@@ -444,6 +444,7 @@ def __init__(self, obj):
444444 self .packet_length = None
445445 self .fragment_offset = None
446446 self .hop_limit = None
447+ self .hop_limit_except = None
447448 self .icmp_type = []
448449 self .icmp_code = []
449450 self .ether_type = []
@@ -904,6 +905,8 @@ def __eq__(self, other):
904905 return False
905906 if self .hop_limit != other .hop_limit :
906907 return False
908+ if self .hop_limit_except != other .hop_limit_except :
909+ return False
907910 if sorted (self .icmp_type ) != sorted (other .icmp_type ):
908911 return False
909912 if sorted (self .icmp_code ) != sorted (other .icmp_code ):
@@ -1240,6 +1243,8 @@ def AddObject(self, obj):
12401243 self .fragment_offset = obj .value
12411244 elif obj .var_type is VarType .HOP_LIMIT :
12421245 self .hop_limit = obj .value
1246+ elif obj .var_type is VarType .HOP_LIMIT_EXCEPT :
1247+ self .hop_limit_except = obj .value
12431248 elif obj .var_type is VarType .SINTERFACE :
12441249 self .source_interface = obj .value
12451250 elif obj .var_type is VarType .DINTERFACE :
@@ -1582,6 +1587,7 @@ class VarType:
15821587 SZONE = 65
15831588 DZONE = 66
15841589 TTL_EXCEPT = 67
1590+ HOP_LIMIT_EXCEPT = 68
15851591
15861592 def __init__ (self , var_type , value ):
15871593 self .var_type = var_type
@@ -1766,6 +1772,7 @@ def __ne__(self, other):
17661772 'FORWARDING_CLASS_EXCEPT' ,
17671773 'FRAGMENT_OFFSET' ,
17681774 'HOP_LIMIT' ,
1775+ 'HOP_LIMIT_EXCEPT' ,
17691776 'APPLY_GROUPS' ,
17701777 'APPLY_GROUPS_EXCEPT' ,
17711778 'HEADER' ,
@@ -1854,6 +1861,7 @@ def __ne__(self, other):
18541861 'fragment-offset' : 'FRAGMENT_OFFSET' ,
18551862 'hex' : 'HEX' ,
18561863 'hop-limit' : 'HOP_LIMIT' ,
1864+ 'hop-limit-except' : 'HOP_LIMIT_EXCEPT' ,
18571865 'apply-groups' : 'APPLY_GROUPS' ,
18581866 'apply-groups-except' : 'APPLY_GROUPS_EXCEPT' ,
18591867 'header' : 'HEADER' ,
@@ -2039,6 +2047,7 @@ def p_term_spec(p):
20392047 | term_spec forwarding_class_except_spec
20402048 | term_spec fragment_offset_spec
20412049 | term_spec hop_limit_spec
2050+ | term_spec hop_limit_except_spec
20422051 | term_spec icmp_type_spec
20432052 | term_spec icmp_code_spec
20442053 | term_spec interface_spec
@@ -2207,6 +2216,9 @@ def p_hop_limit_spec(p):
22072216 else :
22082217 p [0 ] = VarType (VarType .HOP_LIMIT , str (p [4 ]) + '-' + str (p [6 ]))
22092218
2219+ def p_hop_limit_except_spec (p ):
2220+ """ hop_limit_except_spec : HOP_LIMIT_EXCEPT ':' ':' INTEGER"""
2221+ p [0 ] = VarType (VarType .HOP_LIMIT_EXCEPT , p [4 ])
22102222
22112223def p_one_or_more_dscps (p ):
22122224 """ one_or_more_dscps : one_or_more_dscps DSCP_RANGE
0 commit comments