blob: 55ee2ae5e7e604833efe8bdb6a7ebfac599c04b3 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
|
--- lib/tcpconnectedsocket.cpp.orig Thu Jun 29 22:01:48 2006
+++ lib/tcpconnectedsocket.cpp Fri Jan 26 20:36:48 2007
@@ -149,8 +149,10 @@
int TCPConnectedSocket::getMTU()
{
int s;
+ struct protoent *pent;
socklen_t r = sizeof(int);
- if (getsockopt(getDescriptor(), SOL_IP, IP_MTU, &s, &r) < 0) {
+ pent = getprotobyname ("ip");
+ if (getsockopt(getDescriptor(), ((pent != NULL) ? pent->p_proto : 0), IP_MTU, &s, &r) < 0) {
s = -1;
}
|