projects
/
l2tpns.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (from parent 1:
c162b90
)
send snooped packets before adding the tun header
author
bodea
<bodea>
Thu, 4 Nov 2004 23:33:13 +0000
(23:33 +0000)
committer
bodea
<bodea>
Thu, 4 Nov 2004 23:33:13 +0000
(23:33 +0000)
ppp.c
patch
|
blob
|
history
diff --git
a/ppp.c
b/ppp.c
index
6908e90
..
58711e0
100644
(file)
--- a/
ppp.c
+++ b/
ppp.c
@@
-1,6
+1,6
@@
// L2TPNS PPP Stuff
// L2TPNS PPP Stuff
-char const *cvs_id_ppp = "$Id: ppp.c,v 1.1
8 2004/11/03 13:22:39
bodea Exp $";
+char const *cvs_id_ppp = "$Id: ppp.c,v 1.1
9 2004/11/04 23:33:13
bodea Exp $";
#include <stdio.h>
#include <string.h>
#include <stdio.h>
#include <string.h>
@@
-686,6
+686,12
@@
void processipin(tunnelidt t, sessionidt s, u8 *p, u16 l)
return;
}
return;
}
+ if (session[s].snoop_ip && session[s].snoop_port)
+ {
+ // Snooping this session
+ snoop_send_packet(p, l, session[s].snoop_ip, session[s].snoop_port);
+ }
+
// Add on the tun header
p -= 4;
*(u32 *)p = htonl(0x00000800);
// Add on the tun header
p -= 4;
*(u32 *)p = htonl(0x00000800);
@@
-703,11
+709,6
@@
void processipin(tunnelidt t, sessionidt s, u8 *p, u16 l)
session[s].pin++;
eth_tx += l - 4;
session[s].pin++;
eth_tx += l - 4;
- if (session[s].snoop_ip && session[s].snoop_port)
- {
- // Snooping this session
- snoop_send_packet(p, l, session[s].snoop_ip, session[s].snoop_port);
- }
STAT(tun_tx_packets);
INC_STAT(tun_tx_bytes, l);
STAT(tun_tx_packets);
INC_STAT(tun_tx_bytes, l);