| Summary: | [PATCH] NFS replies with incorrect source IP | ||||||
|---|---|---|---|---|---|---|---|
| Product: | Base System | Reporter: | iedowse <iedowse> | ||||
| Component: | kern | Assignee: | Matt Dillon <dillon> | ||||
| Status: | Closed FIXED | ||||||
| Severity: | Affects Only Me | ||||||
| Priority: | Normal | ||||||
| Version: | 3.2-STABLE | ||||||
| Hardware: | Any | ||||||
| OS: | Any | ||||||
| Attachments: |
|
||||||
|
Description
iedowse
1999-08-09 23:30:01 UTC
> NFS over UDP uses just one socket to send and receive, so it can > neither determine at which local IP a request was directed Can't it use IP_RECVDSTADDR? > nor control from which IP the reply is sent. You could rebind the socket before & after sending each reply. That's probably a high enough overhead that multiple sockets is the right way to go anyway. BIll Responsible Changed From-To: freebsd-bugs->dillon I'm working on a solution to the problem. Having nfsd simply bind itself to every possible interface ip will blow up installations that make heavy use of IP aliases. All we really need to do is add an option to nfsd to allow it to bind to a specific IP. If a sysop wishes to bind to multiple IPs the sysop can simply run several nfsd's. It would be very rare for a sysop to want to bind to all interface IPs since the situation where this problem tends to come up the most is where you want to bind NFS to one interface but not another, and protect it with ipfw. I will do a separate commit right now on the bug fixes submitted by the PR. State Changed From-To: open->closed Committed changes to the nfs driver in the kernel and to the nfsd utility to allow nfsd to be bound to specific ip addresses into current. <<On Mon, 8 Nov 1999 10:59:50 -0800 (PST), <dillon@FreeBSD.ORG> said: > I'm working on a solution to the problem. Having nfsd simply bind itself > to every possible interface ip will blow up installations that make heavy > use of IP aliases. All we really need to do is add an option to nfsd to > allow it to bind to a specific IP. Actually, the Right Thing (significantly harder than what you're suggesting) is to: 1) Provide an IP_HDRINCL- or IP_RECVDSTADDR-equivalent option for UDP on the sending side. 2) Make NFS keep track of the original destination address and use said option (/control message) when sending replies. The same approach will fix named, dhcpd, Kerberos' KDC and admin server, and doubtless many other datagram-based servers which currently must open and bind zillions of sockets in order to work around the lack of this functionality (which I believe is a bug). SOCK_RAW ought to work with UDP as well. -GAWollman -- Garrett A. Wollman | O Siem / We are all family / O Siem / We're all the same wollman@lcs.mit.edu | O Siem / The fires of freedom Opinions not those of| Dance in the burning flame MIT, LCS, CRS, or NSA| - Susan Aglukark and Chad Irschick |