Commit 4174f5c6 authored by David Johnson's avatar David Johnson

Fix ip dscp nftables helper.

parent dde4d592
......@@ -121,7 +121,7 @@ def dscp(match=None,cmp_op=0,new=None,family=socket.AF_INET):
kwarg['xor'] = {'attrs': [('NFTA_DATA_VALUE', struct.pack('!H',new << 6))]}
else:
kwarg['mask'] = {'attrs': [('NFTA_DATA_VALUE', struct.pack('B',2**6-1))]}
kwarg['xor'] = {'attrs': [('NFTA_DATA_VALUE', struct.pack('!%s' % (packchr,),0))]}
kwarg['xor'] = {'attrs': [('NFTA_DATA_VALUE', struct.pack('B',new << 6))]}
ret.append(genex('bitwise', kwarg))
kwarg = OrderedDict()
kwarg['sreg'] = 1
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment