Enable kernel acceleration for one-link mppp links
Clients may have enabled mppp without actually using several links. We can support acceleration in that case.
This commit is contained in:
parent
cc012e18fa
commit
011d9a726c
1 changed files with 7 additions and 2 deletions
7
l2tpns.c
7
l2tpns.c
|
|
@ -1143,7 +1143,7 @@ static int can_kernel_accel(sessionidt s)
|
|||
/* Disabled */
|
||||
return 0;
|
||||
|
||||
if (session[s].bundle)
|
||||
if (session[s].bundle != 0 && bundle[session[s].bundle].num_of_links > 1)
|
||||
/* MPPP not supported yet */
|
||||
return 0;
|
||||
|
||||
|
|
@ -7659,7 +7659,12 @@ int sessionsetup(sessionidt s, tunnelidt t)
|
|||
}
|
||||
}
|
||||
|
||||
if (!session[s].bundle || (bundle[session[s].bundle].num_of_links == 1))
|
||||
/* Just one session, can accelerate */
|
||||
create_kernel_accel(s);
|
||||
else if (session[s].bundle && bundle[session[s].bundle].num_of_links == 2)
|
||||
/* Now several sessions, cannot accelerate the first session any more */
|
||||
delete_kernel_accel(bundle[session[s].bundle].members[0]);
|
||||
|
||||
// no need to set a route for the same IP address of the bundle
|
||||
if (!session[s].bundle || (bundle[session[s].bundle].num_of_links == 1))
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue