diff options
author | Phil Sutter <phil@nwl.cc> | 2020-11-10 13:07:49 +0100 |
---|---|---|
committer | Phil Sutter <phil@nwl.cc> | 2020-11-10 14:26:19 +0100 |
commit | f751753f92ea76f582f7d5d1fef8b4d5677ba589 (patch) | |
tree | bf0e39109ec9e30c92534040ad41680cb60a8bd2 /tests/py/ip/meta.t.payload | |
parent | 0f0e5b412804aa18fd18434fb0db360b98a76bf8 (diff) |
proto: Fix ARP header field ordering
In ARP header, destination ether address sits between source IP and
destination IP addresses. Enum arp_hdr_fields had this wrong, which
in turn caused wrong ordering of entries in proto_arp->templates. When
expanding a combined payload expression, code assumes that template
entries are ordered by header offset, therefore the destination ether
address match was printed as raw if an earlier field was matched as
well:
| arp saddr ip 192.168.1.1 arp daddr ether 3e:d1:3f:d6:12:0b
was printed as:
| arp saddr ip 192.168.1.1 @nh,144,48 69068440080907
Note: Although strictly not necessary, reorder fields in
proto_arp->templates as well to match their actual ordering, just to
avoid confusion.
Fixes: 4b0f2a712b579 ("src: support for arp sender and target ethernet and IPv4 addresses")
Signed-off-by: Phil Sutter <phil@nwl.cc>
Diffstat (limited to 'tests/py/ip/meta.t.payload')
0 files changed, 0 insertions, 0 deletions