[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[lwip-devel] [bug #22108] DNS problem

From: Cui hengbin
Subject: [lwip-devel] [bug #22108] DNS problem
Date: Fri, 25 Jan 2008 03:26:29 +0000
User-agent: Mozilla/5.0 (X11; U; Linux i686; zh-CN; rv: Gecko/20071213 Fedora/ Firefox/


                 Summary: DNS problem
                 Project: lwIP - A Lightweight TCP/IP stack
            Submitted by: phant
            Submitted on: Friday 01/25/08 at 03:26
                Category: None
                Severity: 3 - Normal
              Item Group: Change Request
                  Status: None
                 Privacy: Public
             Assigned to: None
             Open/Closed: Open
         Discussion Lock: Any
         Planned Release: 



Hi All:
   When I used 1.30. find the DNS type and class are unkown when attched
  these problem would be the dns_query's struct address alignment  in my
target.I think these should produce when query last address isn't aligned with
some host name.
  so I change the code as follow:
  In func dns_send:
  struct dns_query *qry; ====>struct dns_query;
  /* fill dns query */
    qry = (struct dns_query *)query;   ====> 
    qry->type  = htons(DNS_RRTYPE_A);  ====>qry.type  = htons(DNS_RRTYPE_A);
    qry->class = htons(DNS_RRCLASS_IN); ====>qry.class =
  ====> memcpy(query,&qry,sizeof(struct dns_query));

In func dns_recv:
struct dns_answer *ans; ====> struct dns_answer ans;
ans = (struct dns_answer *)pHostname; ===>
memcpy(&sns,pHostname,sizeof(struct dns_answer));

and change all "ans->" to "ans." in dns_recv function;



Reply to this item at:


  Message sent via/by Savannah

reply via email to

[Prev in Thread] Current Thread [Next in Thread]