net: accept large option length for SO_LINGER
* net.c (print_linger): Allow len > sizeof(struct linger) to match the kernel behaviour.
This commit is contained in:
parent
6314e1d0f1
commit
2ccd886706
5
net.c
5
net.c
@ -489,11 +489,12 @@ print_sockopt_fd_level_name(struct tcb *tcp, int fd, unsigned int level,
|
||||
}
|
||||
|
||||
static void
|
||||
print_linger(struct tcb *const tcp, const kernel_ulong_t addr, const int len)
|
||||
print_linger(struct tcb *const tcp, const kernel_ulong_t addr,
|
||||
const unsigned int len)
|
||||
{
|
||||
struct linger linger;
|
||||
|
||||
if (len != sizeof(linger) ||
|
||||
if (len < sizeof(linger) ||
|
||||
umove(tcp, addr, &linger) < 0) {
|
||||
printaddr(addr);
|
||||
return;
|
||||
|
Loading…
x
Reference in New Issue
Block a user