Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

include/netinet/arp.h: change the type of arp_dev from uint8_t to char #15348

Merged
merged 1 commit into from
Dec 26, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion include/netinet/arp.h
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ struct aligned_data(sizeof(uint32_t)) arpreq
struct sockaddr arp_ha; /* Hardware address */
struct sockaddr arp_netmask; /* Netmask of protocol address */
uint8_t arp_flags; /* Flags */
uint8_t arp_dev[IFNAMSIZ + 1]; /* Device name (zero terminated) */
char arp_dev[IFNAMSIZ + 1]; /* Device name (zero terminated) */
};

/****************************************************************************
Expand Down
3 changes: 1 addition & 2 deletions net/arp/arp_table.c
Original file line number Diff line number Diff line change
Expand Up @@ -243,8 +243,7 @@ static void arp_get_arpreq(FAR struct arpreq *output,
outaddr->sin_addr.s_addr = input->at_ipaddr;
memcpy(output->arp_ha.sa_data, input->at_ethaddr.ether_addr_octet,
sizeof(struct ether_addr));
strlcpy((FAR char *)output->arp_dev, input->at_dev->d_ifname,
sizeof(output->arp_dev));
strlcpy(output->arp_dev, input->at_dev->d_ifname, sizeof(output->arp_dev));
}
#endif

Expand Down
2 changes: 1 addition & 1 deletion net/netdev/netdev_ioctl.c
Original file line number Diff line number Diff line change
Expand Up @@ -1361,7 +1361,7 @@ static bool ioctl_arpreq_parse(FAR struct arpreq *req,
{
*addr = (FAR struct sockaddr_in *)&req->arp_pa;
*dev = req->arp_dev[0] != '\0' ?
netdev_findbyname((FAR const char *)req->arp_dev) :
netdev_findbyname(req->arp_dev) :
netdev_findby_ripv4addr(INADDR_ANY, (*addr)->sin_addr.s_addr);
return true;
}
Expand Down
Loading