*** From dhcp-server -- To unsubscribe, see the end of this message. ***
Hello,
I was recently using the Solaris specific DLPI code from the dhcp-3.0b1pl0
distribution on a SPARC running Solaris 2.6 in a test tool. While doing so, I
was frequently getting the following message :
accepting packet with data after udp payload.
which comes from decode_udp_ip_header() in packet.c. The reason was that
receive_packet(), when using DLPI_RAW, uses read() to get packets.
Unfortunately, read() on the DLPI descriptor was not preserving message
boundaries, so the data from multiple packets was being treated as a single
packet by receive_packet. This should be done using getmsg(). This is the diff
on common/dlpi.c that fixed this for me:
523a524
> struct strbuf data;
528a530
> int get_retn;
536c538,548
< length = read (interface -> rfdesc, dbuf, sizeof (dbuf));
---
> data.maxlen = sizeof(dbuf);
> data.buf = (char *)dbuf;
> data.len = 0;
> get_retn = getmsg(interface-> rfdesc, NULL, &data, &flags);
>
> if(get_retn < 0)
> return -1;
> if(get_retn != 0)
> error("getmsg() unable to read entire data part of message");
>
> length = data.len;
Hopefully this fixes Solaris specific problems that are mentioned in the README
file.
--
Jason Gloudon
-----------------------------------------------------------------------
To unsubscribe from this list, visit http://www.isc.org/dhcp-lists.html
or send mail to [EMAIL PROTECTED] with the subject line of
'unsubscribe'.
-----------------------------------------------------------------------