aboutsummaryrefslogtreecommitdiffstats
path: root/hostapd/ctrl_iface.c
diff options
context:
space:
mode:
authorJouni Malinen <j@w1.fi>2015-07-07 13:21:36 (GMT)
committerJouni Malinen <j@w1.fi>2015-07-07 13:25:06 (GMT)
commit66f1e078e7fe9667ad07ec8da22a7bb8d617bef7 (patch)
treedf5663914a2450a311cacc3dbc4688df3ff5fb07 /hostapd/ctrl_iface.c
parent75352270fa2e901bbdc181b27ea029430af379dc (diff)
downloadhostap-66f1e078e7fe9667ad07ec8da22a7bb8d617bef7.zip
hostap-66f1e078e7fe9667ad07ec8da22a7bb8d617bef7.tar.gz
hostap-66f1e078e7fe9667ad07ec8da22a7bb8d617bef7.tar.bz2
DATA_TEST_TX: Avoid ubsan warning on 0x80<<24 not fitting in int
Use unsigned constant instead of signed to avoid warning with the LSB being set in an int. Signed-off-by: Jouni Malinen <j@w1.fi>
Diffstat (limited to 'hostapd/ctrl_iface.c')
-rw-r--r--hostapd/ctrl_iface.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/hostapd/ctrl_iface.c b/hostapd/ctrl_iface.c
index d729f26..712f94a 100644
--- a/hostapd/ctrl_iface.c
+++ b/hostapd/ctrl_iface.c
@@ -1639,8 +1639,8 @@ static int hostapd_ctrl_iface_data_test_tx(struct hostapd_data *hapd, char *cmd)
ip->tos = tos;
ip->tot_len = htons(HWSIM_IP_LEN);
ip->protocol = 1;
- ip->saddr = htonl(192 << 24 | 168 << 16 | 1 << 8 | 1);
- ip->daddr = htonl(192 << 24 | 168 << 16 | 1 << 8 | 2);
+ ip->saddr = htonl(192U << 24 | 168 << 16 | 1 << 8 | 1);
+ ip->daddr = htonl(192U << 24 | 168 << 16 | 1 << 8 | 2);
ip->check = ipv4_hdr_checksum(ip, sizeof(*ip));
dpos = (u8 *) (ip + 1);
for (i = 0; i < HWSIM_IP_LEN - sizeof(*ip); i++)