This is the mail archive of the ecos-discuss@sources.redhat.com mailing list for the eCos project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

bug in ip_input.c?


Hi,



If setting the MTU in if_loop.c LOMTU=256 (whatever just smaller than the
data to be sent) when running the test udp_lo_test the datapacket has to be
fragmented if sending for example 280 bytes.

Then in ipv4_input the packets will be reassembled. When all packets are
reassembled into one ip-packet again the udp_input should be called with an
mbuf. The code in ip_input.c function ipv4_input looks like:



ip = ip_reass(ipqe, fp);

if (ip == 0) {

	ipq_unlock();

	return;

}

ipstat.ips_reassembled++;

m = dtom(ip);



The last row doesn't create a correct mbuf, why?

The problem is that m_data becomes a NULL-pointer in this case which makes
the function udp_input in udp_usrreq.c unable to check the ip-version when
mtod(m, struct ip *) returns nothing.



I think it should be ok to test the fragmentation and defragmentation in
this simple way but maybe I'm doing something wrong. What do you think? 



/Andreas

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]