Mantis Bugtracker

Viewing Issue Simple Details Jump to Notes ] View Advanced ] Issue History ] Print ]
ID Category Severity Reproducibility Date Submitted Last Update
0000105 [ethersex] Bug minor always 2010-06-15 09:21 2010-06-17 17:43
Reporter murdok View Status public  
Assigned To stettberger
Priority normal Resolution fixed  
Status resolved  
Summary 0000105: NTP query not working without ETHERNET_SUPPORT
Description If ETHERNET_SUPPORT is not present (i.e. only RFM12 and/or ZBUS active),
the NTP query will not work cause it tries to use the UIP buffer with a fixed media header offset of 14 bytes.

Maybe this should be fixed by using defined label from UIP like in other services.

see proposed patch:

--- ethersex/services/ntp/ntp.c 2010-06-03 15:51:34.000000000 +0200
+++ ethersex_patched/services/ntp/ntp.c 2010-06-15 09:15:06.000000000 +0200
@@ -85,9 +85,9 @@
 void
 ntp_send_packet(void)
 {
- /* hardcode for LLH len of 14 bytes (i.e. ethernet frame),
- this is not suitable for tunneling! */
- struct ntp_packet *pkt = (void *) &uip_buf[14 + UIP_IPUDPH_LEN];
+ /* LLH len defined in UIP depending on stacks (i.e. 14 for ethernet frame),
+ may be already suitable for tunneling! */
+ struct ntp_packet *pkt = (void *) &uip_buf[UIP_LLH_LEN + UIP_IPUDPH_LEN];

   uip_slen = sizeof(struct ntp_packet);
   memset(pkt, 0, uip_slen);
Additional Information
Tags No tags attached.
Attached Files

- Relationships

-  Notes
(0000101)
stettberger (manager)
2010-06-17 17:43

Thank you, for the patch. You can also use a repo at github.com so it would be pretty easy for us to pull your bugfixes or even cherry pick single commits.

- Issue History
Date Modified Username Field Change
2010-06-15 09:21 murdok New Issue
2010-06-17 17:43 stettberger Note Added: 0000101
2010-06-17 17:43 stettberger Assigned To => stettberger
2010-06-17 17:43 stettberger Status new => resolved
2010-06-17 17:43 stettberger Resolution open => fixed


Mantis 1.1.6[^]
Copyright © 2000 - 2008 Mantis Group
Powered by Mantis Bugtracker