cli: Show acceleration interface name
And allow selecting a session through it
This commit is contained in:
parent
f00ec1c6e4
commit
0ac498d7d3
3 changed files with 25 additions and 4 deletions
6
l2tpns.c
6
l2tpns.c
|
|
@ -49,8 +49,6 @@
|
|||
#define PPPIOCUNBRIDGECHAN _IO('t', 54)
|
||||
#endif
|
||||
|
||||
#define PPP_IF_PREFIX "ppp"
|
||||
|
||||
#include "md5.h"
|
||||
#include "dhcp6.h"
|
||||
#include "l2tpns.h"
|
||||
|
|
@ -1228,6 +1226,7 @@ static int create_kernel_accel(sessionidt s)
|
|||
sess_local[s].pppox_fd = pppox_fd;
|
||||
sess_local[s].ppp_chan_fd = ppp_chan_fd;
|
||||
sess_local[s].ppp_if_fd = ppp_if_fd;
|
||||
sess_local[s].ppp_if_unit = ifunit;
|
||||
sess_local[s].ppp_if_idx = ifr.ifr_ifindex;
|
||||
|
||||
dhcpv6_listen(ifr.ifr_ifindex);
|
||||
|
|
@ -1256,6 +1255,7 @@ static int delete_kernel_accel(sessionidt s)
|
|||
|
||||
LOG(3, s, session[s].tunnel, "Stopping kernel-accelerated support for %u:%u\n", session[s].tunnel, s);
|
||||
|
||||
sess_local[s].ppp_if_unit = -1;
|
||||
sess_local[s].ppp_if_idx = 0;
|
||||
|
||||
ioctl(sess_local[s].ppp_chan_fd, PPPIOCDISCONN);
|
||||
|
|
@ -3666,6 +3666,7 @@ static void sessionclear(sessionidt s)
|
|||
sess_local[s].pppox_fd = -1;
|
||||
sess_local[s].ppp_chan_fd = -1;
|
||||
sess_local[s].ppp_if_fd = -1;
|
||||
sess_local[s].ppp_if_unit = -1;
|
||||
memset(&cli_session_actions[s], 0, sizeof(cli_session_actions[s]));
|
||||
|
||||
session[s].tunnel = T_FREE; // Mark it as free.
|
||||
|
|
@ -6229,6 +6230,7 @@ static void initdata(int optdebug, char *optconfig)
|
|||
sess_local[i].pppox_fd = -1;
|
||||
sess_local[i].ppp_chan_fd = -1;
|
||||
sess_local[i].ppp_if_fd = -1;
|
||||
sess_local[i].ppp_if_unit = -1;
|
||||
}
|
||||
session[MAXSESSION - 1].next = 0;
|
||||
sessionfree = 1;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue