--- dhis-client-5.5.orig/network.c
+++ dhis-client-5.5/network.c
@@ -29,6 +29,7 @@
 #include "dhid.h"
 
 int udp_sock;
+extern int rport;
 
 
 /*
@@ -250,6 +251,7 @@ int net_write_message(msg_t *p,int toadd
 
 	p->hdr.version=DHIS_VERSION;
 	p->hdr.serial=get_serial();
+	p->hdr.rport=rport;
 
         /* set destination */
         sa.sin_family=AF_INET;
