L2TP output netif is now selectable, making it useful to select a default route for the L2TP tunnel, in case the default interface is set to the L2TP PPP interface

This commit is contained in:
Sylvain Rochet
2012-07-12 01:11:08 +02:00
parent de6be743c6
commit 78565026ac
6 changed files with 67 additions and 30 deletions

View File

@@ -172,6 +172,7 @@ struct pppol2tp_pcb_s {
u8_t phase; /* L2TP phase */
void (*link_status_cb)(ppp_pcb *pcb, int status);
struct udp_pcb *udp; /* UDP L2TP Socket */
struct netif *netif; /* Output interface, used as a default route */
ip_addr_t remote_ip; /* LNS IP Address */
u16_t remote_port; /* LNS port */
#if PPPOL2TP_AUTH_SUPPORT
@@ -205,7 +206,7 @@ err_t pppol2tp_create(ppp_pcb *ppp, void (*link_status_cb)(ppp_pcb *pcb, int sta
err_t pppol2tp_destroy(pppol2tp_pcb *l2tp);
/* Be a LAC, connect to a LNS. */
err_t pppol2tp_connect(pppol2tp_pcb *l2tp, ip_addr_t *ipaddr, u16_t port);
err_t pppol2tp_connect(pppol2tp_pcb *l2tp, struct netif *netif, ip_addr_t *ipaddr, u16_t port);
/* Disconnect */
void pppol2tp_disconnect(pppol2tp_pcb *l2tp);