printf 'hh' length modifier is a gnu extension. Don't use it.
This commit is contained in:
parent
00e7e2a61b
commit
77ce7b9a6c
@ -520,7 +520,7 @@ static int validate_dhcp_packet(struct client_state_t *cs, size_t len,
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
if (memcmp(packet->chaddr, client_config.arp, sizeof client_config.arp)) {
|
if (memcmp(packet->chaddr, client_config.arp, sizeof client_config.arp)) {
|
||||||
log_line("Packet client MAC %2.2hhx:%2.2hhx:%2.2hhx:%2.2hhx:%2.2hhx:%2.2hhx does not equal our MAC %2.2hhx:%2.2hhx:%2.2hhx:%2.2hhx:%2.2hhx:%2.2hhx. Ignoring it.",
|
log_line("Packet client MAC %2.2x:%2.2x:%2.2x:%2.2x:%2.2x:%2.2x does not equal our MAC %2.2x:%2.2x:%2.2x:%2.2x:%2.2x:%2.2x. Ignoring it.",
|
||||||
packet->chaddr[0], packet->chaddr[1], packet->chaddr[2],
|
packet->chaddr[0], packet->chaddr[1], packet->chaddr[2],
|
||||||
packet->chaddr[3], packet->chaddr[4], packet->chaddr[5],
|
packet->chaddr[3], packet->chaddr[4], packet->chaddr[5],
|
||||||
client_config.arp[0], client_config.arp[1],
|
client_config.arp[0], client_config.arp[1],
|
||||||
|
@ -65,7 +65,7 @@ static void get_iaid_path(char *iaidfile, size_t ilen, uint8_t *hwaddr,
|
|||||||
}
|
}
|
||||||
int splen = snprintf
|
int splen = snprintf
|
||||||
(iaidfile, ilen,
|
(iaidfile, ilen,
|
||||||
"%s/IAID-%2.2hhx:%2.2hhx:%2.2hhx:%2.2hhx:%2.2hhx:%2.2hhx",
|
"%s/IAID-%2.2x:%2.2x:%2.2x:%2.2x:%2.2x:%2.2x",
|
||||||
state_dir, hwaddr[0], hwaddr[1], hwaddr[2],
|
state_dir, hwaddr[0], hwaddr[1], hwaddr[2],
|
||||||
hwaddr[3], hwaddr[4], hwaddr[5]);
|
hwaddr[3], hwaddr[4], hwaddr[5]);
|
||||||
if (splen < 0) {
|
if (splen < 0) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user