X-Git-Url: https://git.decadent.org.uk/gitweb/?p=nfs-utils.git;a=blobdiff_plain;f=support%2Fnfs%2Frpcmisc.c;fp=support%2Fnfs%2Frpcmisc.c;h=22ea62c1a88f5d8458968c4fe82cf88dc802025a;hp=5b0a88ff76745ea86c019718272bd3c10c66fa77;hb=bd401e645200601ab9c25dab905425112f3cafc4;hpb=0ec44a497a508fb631d472ce8c33041c497e1ca5 diff --git a/support/nfs/rpcmisc.c b/support/nfs/rpcmisc.c index 5b0a88f..22ea62c 100644 --- a/support/nfs/rpcmisc.c +++ b/support/nfs/rpcmisc.c @@ -184,8 +184,11 @@ int makesock(int port, int proto) sin.sin_port = htons(port); val = 1; - if (setsockopt(s, SOL_SOCKET, SO_REUSEADDR, &val, sizeof(val)) < 0) - xlog(L_ERROR, "setsockopt failed: %s\n", strerror(errno)); + if (proto == IPPROTO_TCP) + if (setsockopt(s, SOL_SOCKET, SO_REUSEADDR, + &val, sizeof(val)) < 0) + xlog(L_ERROR, "setsockopt failed: %s\n", + strerror(errno)); #if 0 /* I was told it didn't work with gigabit ethernet.