mirror of
https://git.FreeBSD.org/src.git
synced 2024-12-04 09:09:56 +00:00
rtsold: Use correct error in llflags_get()
Set errno to EINVAL if the name overflows the buffer, as was done before commitecce515d54
. Reviewed by: dab, markj Fixes:ecce515d54
MFC after: 1 week Sponsored by: Dell EMC Isilon Differential Revision: https://reviews.freebsd.org/D34354
This commit is contained in:
parent
1cedb4ea1a
commit
a2a8efb4f6
@ -91,7 +91,7 @@ llflags_get(const char *ifname, int *flagsp)
|
||||
memset(&ifr6, 0, sizeof(ifr6));
|
||||
if (strlcpy(ifr6.ifr_name, ifname, sizeof(ifr6.ifr_name)) >=
|
||||
sizeof(ifr6.ifr_name)) {
|
||||
error = errno;
|
||||
error = EINVAL;
|
||||
goto out;
|
||||
}
|
||||
memcpy(&ifr6.ifr_ifru.ifru_addr, sin6, sin6->sin6_len);
|
||||
|
Loading…
Reference in New Issue
Block a user