|
From: | nkarakotas |
Subject: | [lwip-users] 2 Interfaces , PPP over Serial and Ethernet |
Date: | Mon, 5 Mar 2012 11:23:29 +0200 |
Hello,
I have system with an ethernet and a GSM modem on. The application involves
uploading remotely through the PPP connection and ethernet usually to access the
web application. I have a problem when running the two interfaces together.
Separately they run ok. Initialy I bring up the ethernet and add it as the
default interface. Then I connect to the ISP via PPP. Its all ok and it adds the
interface pp.
I then try to netconn_gethostbyname(). I get a fault in
the ip.c file at ip_route function:
It searches for the appropriate interface it finds pp which is up but
doesn’t meet the following condition:
if (ip_addr_netcmp(dest, &(netif->ip_addr),
&(netif->netmask))) {
}
Afterwards it iterates the list and the weird thing is that it doesn’t find
em interface. Then netif –>next should be 0x0 but is 0xfffffff. This makes me
think of some overflow or stack problem. I don’t really know where to look any
help would be appreciated!
struct netif *
ip_route(ip_addr_t *dest)
{
struct netif *netif;
/* iterate through netifs */
for(netif = netif_list; netif != NULL; netif = netif->next)
{
/* network mask matches? */
if (netif_is_up(netif)) {
if (ip_addr_netcmp(dest,
&(netif->ip_addr), &(netif->netmask))) {
/* return netif on which to
forward IP packet */
return netif;
}
}
}
.....
}
Regards,
Nick |
[Prev in Thread] | Current Thread | [Next in Thread] |