Skip to content

Commit

Permalink
netlink: support custom header_type in array NLA
Browse files Browse the repository at this point in the history
Bug-Url: #575
  • Loading branch information
svinota committed Feb 28, 2019
1 parent 79cc149 commit d702cfa
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion pyroute2/netlink/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -600,6 +600,7 @@ class nlmsg_base(dict):
is_nla = False
prefix = None
own_parent = False
header_type = None
# caches
__compiled_nla = False
__compiled_ft = False
Expand Down Expand Up @@ -1014,7 +1015,7 @@ def encode(self):
offset=offset,
parent=self)
cell._nla_array = False
cell['header']['type'] = header_type
cell['header']['type'] = self.header_type or header_type
header_type += 1

if cell.cell_header is not None:
Expand Down

0 comments on commit d702cfa

Please sign in to comment.