forked from mirrors/tftp-hpa-google
tftpd: correctly disable PMTU discovery in standalone mode
Use the correct file descriptors so we correctly turn off PMTU.
This commit is contained in:
parent
932277c9a5
commit
acf818880c
1 changed files with 2 additions and 2 deletions
|
@ -719,7 +719,7 @@ int main(int argc, char **argv)
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Disable path MTU discovery */
|
/* Disable path MTU discovery */
|
||||||
pmtu_discovery_off(0);
|
pmtu_discovery_off(fd);
|
||||||
|
|
||||||
/* This means we don't want to wait() for children */
|
/* This means we don't want to wait() for children */
|
||||||
#ifdef SA_NOCLDWAIT
|
#ifdef SA_NOCLDWAIT
|
||||||
|
@ -962,7 +962,7 @@ int main(int argc, char **argv)
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Disable path MTU discovery */
|
/* Disable path MTU discovery */
|
||||||
pmtu_discovery_off(0);
|
pmtu_discovery_off(peer);
|
||||||
|
|
||||||
tp = (struct tftphdr *)buf;
|
tp = (struct tftphdr *)buf;
|
||||||
tp_opcode = ntohs(tp->th_opcode);
|
tp_opcode = ntohs(tp->th_opcode);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue