]> git.ipfire.org Git - thirdparty/hostap.git/commitdiff
wlantest: Use BSD compatible UDP header struct
authorJouni Malinen <j@w1.fi>
Sun, 5 Apr 2020 14:56:20 +0000 (17:56 +0300)
committerJouni Malinen <j@w1.fi>
Sun, 5 Apr 2020 15:53:59 +0000 (18:53 +0300)
Signed-off-by: Jouni Malinen <j@w1.fi>
wlantest/wired.c

index 653be337adb20fb2d865895dfcc74be8d46af906..67ae8a9afa9b9dba919eb32b8d2a5d710775206b 100644 (file)
@@ -212,9 +212,9 @@ static void process_udp(struct wlantest *wt, u32 dst, u32 src,
                return;
        udp = (const struct udphdr *) data;
        /* TODO: check UDP checksum */
-       sport = be_to_host16(udp->source);
-       dport = be_to_host16(udp->dest);
-       ulen = be_to_host16(udp->len);
+       sport = be_to_host16(udp->uh_sport);
+       dport = be_to_host16(udp->uh_dport);
+       ulen = be_to_host16(udp->uh_ulen);
 
        if (ulen > len)
                return;