- reply->result = SUCCESS;
- reply->epoch = getuptime();
-
- if ( reply->lifetime ) /* not delete mapping */
- reply->publicport = publicport;
- bytes = sendto (fd, (void*)reply, sizeof(publicportreq), 0, (struct sockaddr*)clientaddr, clientaddrlen);
- if ( bytes != sizeof(publicportreq) )
- printf( "PORTMAP::problem sending portmap reply - opcode %d\n", reply->opcode );
+ reply.result = SUCCESS;
+ reply.epoch = getuptime();
+
+ if ( req->lifetime ){ /* not delete mapping */
+ reply.privateport = req->privateport;
+ reply.publicport = publicport;
+ }
+ bytes = sendto (fd, (void*)&reply, sizeof(publicportreply), 0, (struct sockaddr*)clientaddr, clientaddrlen);
+ if ( bytes != sizeof(publicportreply) )
+ printf( "PORTMAP::problem sending portmap reply - opcode %d\n", req->opcode );