aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/vppinfra/unix-formats.c9
1 files changed, 3 insertions, 6 deletions
diff --git a/src/vppinfra/unix-formats.c b/src/vppinfra/unix-formats.c
index 678700e6129..af1eb1aaa7b 100644
--- a/src/vppinfra/unix-formats.c
+++ b/src/vppinfra/unix-formats.c
@@ -316,13 +316,10 @@ u8 * format_udp4_packet (u8 * s, va_list * args)
struct iphdr * ip = (void *) p;
struct udphdr * udp = (void *) (ip + 1);
- u16 source = udp->uh_sport;
- u16 dest = udp->uh_dport;
-
s = format (s, "udp %U:%U -> %U:%U", format_network_address, AF_INET,
- &ip->saddr, format_network_port, IPPROTO_UDP, ntohs (source),
- format_network_address, AF_INET, &ip->daddr, format_network_port,
- IPPROTO_UDP, ntohs (dest));
+ &ip->saddr, format_network_port, IPPROTO_UDP,
+ ntohs (udp->source), format_network_address, AF_INET, &ip->daddr,
+ format_network_port, IPPROTO_UDP, ntohs (udp->dest));
return s;
}