]> granicus.if.org Git - strace/commitdiff
nlattr: specify size for ethernet protocol
authorEugene Syromyatnikov <evgsyr@gmail.com>
Sun, 10 Jun 2018 10:43:33 +0000 (12:43 +0200)
committerDmitry V. Levin <ldv@altlinux.org>
Mon, 11 Jun 2018 14:02:06 +0000 (14:02 +0000)
Otherwise it tries to decode payload of size 1, which makes little
sense.

* nlattr.c (decode_nla_ether_proto) <opts>: Specify size field.

Fixes: v4.22-321-gfd0cd65 "nlattr: add ethernet protocol decoder"
nlattr.c

index cee827fc3a66ab2e8dc4319d70ebabec93c2bbf3..af7cc162e3606bd09fd8a40fa3caaca99b7869f3 100644 (file)
--- a/nlattr.c
+++ b/nlattr.c
@@ -333,6 +333,7 @@ decode_nla_ether_proto(struct tcb *const tcp,
                .xt = XT_SORTED,
                .prefix = "htons(",
                .suffix = ")",
+               .size = 2,
                .process_fn = process_host_order,
        };