projects
/
l2tpns.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
improved load balancing algorithm.
[l2tpns.git]
/
l2tpns.c
diff --git
a/l2tpns.c
b/l2tpns.c
index
9ac6bfd
..
9861e88
100644
(file)
--- a/
l2tpns.c
+++ b/
l2tpns.c
@@
-1413,7
+1413,7
@@
void processipout(uint8_t *buf, int len)
groupidt g;
sessiont *sp;
tunnelidt t;
groupidt g;
sessiont *sp;
tunnelidt t;
- in_addr_t ip;
+ in_addr_t ip
, ip_src
;
uint8_t *data = buf; // Keep a copy of the originals.
int size = len;
uint8_t *data = buf; // Keep a copy of the originals.
int size = len;
@@
-1446,10
+1446,11
@@
void processipout(uint8_t *buf, int len)
return;
}
return;
}
+ ip_src = *(uint32_t *)(buf + 12);
ip = *(uint32_t *)(buf + 16);
if ((g = grp_groupbyip(ip)))
{
ip = *(uint32_t *)(buf + 16);
if ((g = grp_groupbyip(ip)))
{
- s = grp_getnextsession(g, ip);
+ s = grp_getnextsession(g, ip
, ip_src
);
if (!s)
{
// Is this a packet for a session that doesn't exist?
if (!s)
{
// Is this a packet for a session that doesn't exist?