mirror of
https://git.proxmox.com/git/mirror_frr
synced 2025-08-14 10:37:29 +00:00
parent
1ac29269cd
commit
b19abe1131
@ -110,7 +110,7 @@ static int linux_configure_arp(const char *iface, int on)
|
|||||||
{
|
{
|
||||||
struct ifreq ifr;
|
struct ifreq ifr;
|
||||||
|
|
||||||
strlcpy(ifr.ifr_name, iface, sizeof(ifr.ifr_name));
|
strncpy(ifr.ifr_name, iface, IFNAMSIZ - 1);
|
||||||
if (ioctl(nhrp_socket_fd, SIOCGIFFLAGS, &ifr))
|
if (ioctl(nhrp_socket_fd, SIOCGIFFLAGS, &ifr))
|
||||||
return -1;
|
return -1;
|
||||||
|
|
||||||
|
@ -550,7 +550,7 @@ int sock_open_unix(const char *path)
|
|||||||
|
|
||||||
memset(&addr, 0, sizeof(struct sockaddr_un));
|
memset(&addr, 0, sizeof(struct sockaddr_un));
|
||||||
addr.sun_family = AF_UNIX;
|
addr.sun_family = AF_UNIX;
|
||||||
strlcpy(addr.sun_path, path, sizeof(addr.sun_path));
|
strncpy(addr.sun_path, path, sizeof(addr.sun_path) - 1);
|
||||||
|
|
||||||
ret = connect(fd, (struct sockaddr *)&addr,
|
ret = connect(fd, (struct sockaddr *)&addr,
|
||||||
sizeof(addr.sun_family) + strlen(addr.sun_path));
|
sizeof(addr.sun_family) + strlen(addr.sun_path));
|
||||||
|
Loading…
Reference in New Issue
Block a user