PPP Problems

Previously, when connecting to an ISP to send email using PPP, there was no problem assigning an IP address to the connection using a fixed IP (using PPPSetPeerAddr()). Now, however, it appears that many ISP’s are not allowing this. But, for dial-in purposes, we need to know the IP address, so the user can set his browser IP address to the embedded Web Server’s subnet. Once PPPSetPeerAddr() is called, no matter with what IP address, it is no longer possible to dial out once someone has dialed in the the Web Server, because the embedded server tries to use the IP address assigned to the dial-in link. Even calling PPPSetPeerAddr() with an address of 0 doesn’t help. Anyone have any ideas?

I belive this issue is addresses with the following code snippet: So we can no longer connect to the ISP unless we reboot. Apparently a flag somewhere was getting stuck. When we looked into the source code we realized that based on the PPPSetPeerAddr function: static unsigned int myIpAddr[] = {0, 0}; int PPPSetPeerAddr(unsigned int commPort, unsigned long IPaddr) { int if_number; u16 flags; if_number = findMyLineNumber (commPort); if (if_number < 0) { return UNIT_OUT_OF_RANGE; /* error / } / Set the peer’s IP Address and disallow him providing one / if( ppp_ipcp_set_peer_addr( ppp_interfaces[if_number].devname, htonl((u32)IPaddr) ) != FNS_ENOERR ) { / IPCP probably up already / return EBUSY; } / Save it in the database too / ppp_interfaces[if_number].peeraddress = IPaddr; ppp_ipcp_get_options( ppp_interfaces[if_number].devname, &flags ); flags &= ~IPCP_ACCEPT_REMOTE; if( ppp_ipcp_set_options( ppp_interfaces[if_number].devname, flags ) != FNS_ENOERR ) { return EBUSY; / Shouldn’t happen hopefully, but what if?? / } return SUCCESS; / success */ } the problem is in the flags &= ~IPCP_ACCEPT_REMOTE; line and can be resolved by restoring this flag when you switch from server to client mode.