In rbootd a struct bpf_timeval (with 32bit tv_sec) is copied to a struct
timeval (with 64 tv_sec) via bcopy(). This most likely causes
connections to not time out correctly in rbootd. I don't have an HP
machine to test this with. Who owns such a machine and is willing to
test this?
natano
Index: bpf.c
===================================================================
RCS file: /cvs/src/usr.sbin/rbootd/bpf.c,v
retrieving revision 1.23
diff -u -p -r1.23 bpf.c
--- bpf.c 20 Aug 2015 22:39:29 -0000 1.23
+++ bpf.c 14 Apr 2016 19:49:49 -0000
@@ -362,8 +362,8 @@ BpfRead(RMPCONN *rconn, int doread)
caplen);
else {
rconn->rmplen = caplen;
- bcopy((char *)&bhp->bh_tstamp, (char *)&rconn->tstamp,
- sizeof(struct timeval));
+ rconn->tstamp.tv_sec = bhp->bh_tstamp.tv_sec;
+ rconn->tstamp.tv_usec = bhp->bh_tstamp.tv_usec;
bcopy((char *)bp + hdrlen, (char *)&rconn->rmp, caplen);
}
bp += BPF_WORDALIGN(caplen + hdrlen);