mirror of
https://git.proxmox.com/git/mirror_iproute2
synced 2025-10-18 18:31:07 +00:00
tc filter: fix dport/sport in pretty print output
Problem reported by Peter Lebbing on Debian. The decode of source and destination port filters in pretty print mode was backwards.
This commit is contained in:
parent
f78e316f25
commit
bcd7abddd4
@ -860,15 +860,15 @@ static void print_ipv4(FILE *f, const struct tc_u32_key *key)
|
||||
case 20:
|
||||
switch (ntohl(key->mask)) {
|
||||
case 0x0000ffff:
|
||||
fprintf(f, "\n match sport %u",
|
||||
fprintf(f, "\n match dport %u",
|
||||
ntohl(key->val) & 0xffff);
|
||||
return;
|
||||
case 0xffff0000:
|
||||
fprintf(f, "\n match dport %u",
|
||||
fprintf(f, "\n match sport %u",
|
||||
ntohl(key->val) >> 16);
|
||||
return;
|
||||
case 0xffffffff:
|
||||
fprintf(f, "\n match sport %u, match dport %u",
|
||||
fprintf(f, "\n match dport %u, match sport %u",
|
||||
ntohl(key->val) & 0xffff,
|
||||
ntohl(key->val) >> 16);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user