Bug #4483
closedrpcbind: Reply for remote calls comes from incorrect UDP port
100%
Description
Consider the rmtcall test as it could be found in #4456. This test initiates remote call (type BCAST) for rpcbind at localhost asking to remotely call GETTIME procedure.
Here is the communication:
# snoop -r -d lo0 -V Using device lo0 (promiscuous mode) ________________________________ 127.0.0.1 -> 127.0.0.1 IPNET src zone 0 dst zone 0 127.0.0.1 -> 127.0.0.1 IP D=127.0.0.1 S=127.0.0.1 LEN=84, ID=0, TOS=0x0, TTL=255 127.0.0.1 -> 127.0.0.1 UDP D=111 S=47279 LEN=64 127.0.0.1 -> 127.0.0.1 RPC C XID=1389445658 PROG=100000 (PMAP) VERS=4 PROC=5 127.0.0.1 -> 127.0.0.1 RPCBIND C BCAST prog=PMAP vers=4 proc=6 127.0.0.1 -> 127.0.0.1 RPCBIND C GETTIME ________________________________ 127.0.0.1 -> 127.0.0.1 IPNET src zone 0 dst zone 0 127.0.0.1 -> 127.0.0.1 IP D=127.0.0.1 S=127.0.0.1 LEN=68, ID=0, TOS=0x0, TTL=255 127.0.0.1 -> 127.0.0.1 UDP D=111 S=37197 LEN=48 127.0.0.1 -> 127.0.0.1 RPC C XID=3021490624 PROG=100000 (PMAP) VERS=4 PROC=6 127.0.0.1 -> 127.0.0.1 RPCBIND C GETTIME ________________________________ 127.0.0.1 -> 127.0.0.1 IPNET src zone 0 dst zone 0 127.0.0.1 -> 127.0.0.1 IP D=127.0.0.1 S=127.0.0.1 LEN=56, ID=0, TOS=0x0, TTL=255 127.0.0.1 -> 127.0.0.1 UDP D=37197 S=111 LEN=36 127.0.0.1 -> 127.0.0.1 RPC R (#2) XID=3021490624 Success 127.0.0.1 -> 127.0.0.1 RPCBIND R GETTIME ________________________________ 127.0.0.1 -> 127.0.0.1 IPNET src zone 0 dst zone 0 127.0.0.1 -> 127.0.0.1 IP D=127.0.0.1 S=127.0.0.1 LEN=80, ID=0, TOS=0x0, TTL=255 127.0.0.1 -> 127.0.0.1 UDP D=47279 S=37197 LEN=60 127.0.0.1 -> 127.0.0.1 RPC R (#1) XID=1389445658 Success 127.0.0.1 -> 127.0.0.1 RPCBIND R BCAST Uaddr=127.0.0.1.0.111 len=4 127.0.0.1 -> 127.0.0.1 RPCBIND R GETTIME
The first packet is the BCAST call initiated by the rmtcall test program. The source port is 47279 and target port is 111 (rpcbind port).
The second packet is sent by rpcbind (source port 37197) back to rpcbind (target port 111). This is the actual GETTIME call.
The third packet is reply to the second packet. The source port is 111 and the target port is 37197. This is correct.
The problem is with the fourth packet. The fourth packet is a reply to the first packet (the BCAST). We would expect that the source port is 111 and the target port is 47279. But instead, we see the source port set to 37197. This is actually the port we saw in the second and third packet.
Related issues
Updated by Robert Mustacchi about 8 years ago
- Status changed from In Progress to Resolved
- % Done changed from 0 to 100
- Tags deleted (
needs-triage)
Updated by Electric Monk about 8 years ago
git commit 8f6d9dae92449b59bdafcb7777bc32f1b2726e48
Author: Marcel Telka <marcel.telka@nexenta.com> 4575 Single threaded rpcbind is not scalable 4483 rpcbind: Reply for remote calls comes from incorrect UDP port Reviewed by: Ilya Usvyatsky <ilya.usvyatsky@nexenta.com> Reviewed by: Jan Kryl <jan.kryl@nexenta.com> Reviewed by: Michael Schuster <michaelsprivate@gmail.com> Reviewed by: Gary Mills <gary_mills@fastmail.fm> Reviewed by: Jerry Jelinek <jerry.jelinek@joyent.com> Approved by: Robert Mustacchi <rm@joyent.com>