Re: [PATCH net-next v3 07/12] tools/net/ynl: Add support for netlink-raw families

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Donald Hunter <donald.hunter@xxxxxxxxx> writes:
>
> -    def handle_ntf(self, nl_msg, genl_msg):
> +    def handle_ntf(self, decoded):
>          msg = dict()
>          if self.include_raw:
> -            msg['nlmsg'] = nl_msg
> -            msg['genlmsg'] = genl_msg
> -        op = self.rsp_by_value[genl_msg.genl_cmd]
> +            msg['raw'] = decoded
> +        op = self.rsp_by_value[decoded.cmd()]
> +        attrs = self._decode(decoded.raw_attrs, op.attr_set.name)
> +        if op.fixed_header:
> +            attrs.update(self._decode_fixed_header(gm, op.fixed_header))

There's a mistake here, 'gm' should be 'decoded'. I'll fix in a v4.

> +
>          msg['name'] = op['name']
> -        msg['msg'] = self._decode(genl_msg.raw_attrs, op.attr_set.name)
> +        msg['msg'] = attrs
>          self.async_msg_queue.append(msg)



[Index of Archives]     [Kernel Newbies]     [Security]     [Netfilter]     [Bugtraq]     [Linux FS]     [Yosemite Forum]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Video 4 Linux]     [Device Mapper]     [Linux Resources]

  Powered by Linux