@@ -444,6 +444,7 @@ def __init__(self, obj):
444
444
self .packet_length = None
445
445
self .fragment_offset = None
446
446
self .hop_limit = None
447
+ self .hop_limit_except = None
447
448
self .icmp_type = []
448
449
self .icmp_code = []
449
450
self .ether_type = []
@@ -904,6 +905,8 @@ def __eq__(self, other):
904
905
return False
905
906
if self .hop_limit != other .hop_limit :
906
907
return False
908
+ if self .hop_limit_except != other .hop_limit_except :
909
+ return False
907
910
if sorted (self .icmp_type ) != sorted (other .icmp_type ):
908
911
return False
909
912
if sorted (self .icmp_code ) != sorted (other .icmp_code ):
@@ -1240,6 +1243,8 @@ def AddObject(self, obj):
1240
1243
self .fragment_offset = obj .value
1241
1244
elif obj .var_type is VarType .HOP_LIMIT :
1242
1245
self .hop_limit = obj .value
1246
+ elif obj .var_type is VarType .HOP_LIMIT_EXCEPT :
1247
+ self .hop_limit_except = obj .value
1243
1248
elif obj .var_type is VarType .SINTERFACE :
1244
1249
self .source_interface = obj .value
1245
1250
elif obj .var_type is VarType .DINTERFACE :
@@ -1582,6 +1587,7 @@ class VarType:
1582
1587
SZONE = 65
1583
1588
DZONE = 66
1584
1589
TTL_EXCEPT = 67
1590
+ HOP_LIMIT_EXCEPT = 68
1585
1591
1586
1592
def __init__ (self , var_type , value ):
1587
1593
self .var_type = var_type
@@ -1766,6 +1772,7 @@ def __ne__(self, other):
1766
1772
'FORWARDING_CLASS_EXCEPT' ,
1767
1773
'FRAGMENT_OFFSET' ,
1768
1774
'HOP_LIMIT' ,
1775
+ 'HOP_LIMIT_EXCEPT' ,
1769
1776
'APPLY_GROUPS' ,
1770
1777
'APPLY_GROUPS_EXCEPT' ,
1771
1778
'HEADER' ,
@@ -1854,6 +1861,7 @@ def __ne__(self, other):
1854
1861
'fragment-offset' : 'FRAGMENT_OFFSET' ,
1855
1862
'hex' : 'HEX' ,
1856
1863
'hop-limit' : 'HOP_LIMIT' ,
1864
+ 'hop-limit-except' : 'HOP_LIMIT_EXCEPT' ,
1857
1865
'apply-groups' : 'APPLY_GROUPS' ,
1858
1866
'apply-groups-except' : 'APPLY_GROUPS_EXCEPT' ,
1859
1867
'header' : 'HEADER' ,
@@ -2039,6 +2047,7 @@ def p_term_spec(p):
2039
2047
| term_spec forwarding_class_except_spec
2040
2048
| term_spec fragment_offset_spec
2041
2049
| term_spec hop_limit_spec
2050
+ | term_spec hop_limit_except_spec
2042
2051
| term_spec icmp_type_spec
2043
2052
| term_spec icmp_code_spec
2044
2053
| term_spec interface_spec
@@ -2207,6 +2216,9 @@ def p_hop_limit_spec(p):
2207
2216
else :
2208
2217
p [0 ] = VarType (VarType .HOP_LIMIT , str (p [4 ]) + '-' + str (p [6 ]))
2209
2218
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 ])
2210
2222
2211
2223
def p_one_or_more_dscps (p ):
2212
2224
""" one_or_more_dscps : one_or_more_dscps DSCP_RANGE
0 commit comments