no udp response on FreeBSD/arm

Vernon Schryver vjs@rhyolite.com
Sun Jun 24 16:49:53 UTC 2012


> From: "Ronald Klop" <ronald-freebsd8@klop.yi.org>

> Cdcc info works and the network traffic looks ok. So I do not see a  
> firewall issue.

ok.

> Wireshark (1.8) gives some interesting outcome. Here are the dump files.
> https://dl.dropbox.com/u/74961258/dump-amd64.pcap
> https://dl.dropbox.com/u/74961258/dump-arm.pcap
>
> The first md5 sum is shifted 2 bytes in dump-arm.
> amd: 28:49:3c:d1:60:ac:70:13:16:df:e6:a7:d7:0c:4c:e4
> arm: 08:20:28:49:3c:d1:60:ac:70:13:16:df:e6:a7:d7:0c
>
> The length field of the checksum says 36 on arm and 18 on amd64. And the  
> arm value looks padded with 0's at the end.

Yes.

Are you using current official DCC source from
http://www.dcc-servers.net/dcc/#downloads or http://www.rhyolite.com/dcc/ ?
Have you modified any of it at all?
I assume (and hope) not, but experience demands that I ask.


This is the code in clntlib/ask.c that puts the checksums into the request:

	ck = rpt.r.cks;
	num_cks = 0;
	for (g = cks->sums; g <= &cks->sums[DCC_CK_TYPE_LAST]; ++g) {
		/* do not tell the DCC server about some checksums */
		if (!g->rpt2srvr)
			continue;
		ck->len = sizeof(*ck);
		ck->type = g->type;
		ck->sum = g->sum;
		++ck;
		++num_cks;
	}

These are the relevant definitions from include/dcc_proto.h

    typedef u_char DCC_CK_TYPE_B;
    typedef struct {
	u_char	hi, lo;
    } DCC_FLOD_PATH_ID;
    typedef union {
	u_char b[16];
	DCC_FLOD_PATH_ID p[8];
    } DCC_SUM;
    typedef struct {
	DCC_CK_TYPE_B type;
	u_char	len;			/* total length of this checksum */
	DCC_SUM	sum;
    } DCC_CK;


It can't be that sizeof(u_char)==2, because 1 byte fields 
such as the checksum length are using single bytes.

If it were an alignment or structure confusion, I'd expect 
the length to be rounded up to 20 or 24 instead of 36.

It would be interesting to see what the compiler thinks about
the sizes and alignments of the structure elements of cks->sums.


Vernon Schryver    vjs@rhyolite.com



More information about the DCC mailing list

Contact vjs@rhyolite.com by mail or use the form.