1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
|
$NetBSD: patch-ad,v 1.1 2001/03/18 18:55:29 tron Exp $
--- pppoe.c.orig Mon Feb 5 17:34:49 2001
+++ pppoe.c Sun Mar 18 19:14:55 2001
@@ -109,7 +109,7 @@
* packet before passing it here.
***********************************************************************/
void
-sessionDiscoveryPacket(PPPoEPacket *packet)
+sessionDiscoveryPacket(PPPoEConnection *conn, PPPoEPacket *packet)
{
/* Sanity check */
if (packet->code != CODE_PADT) {
@@ -117,7 +117,7 @@
}
/* It's a PADT, all right. Is it for us? */
- if (packet->session != Session) {
+ if (packet->session != conn->session) {
/* Nope, ignore it */
return;
}
@@ -222,9 +222,9 @@
/* check for buffered session data */
while (BPF_BUFFER_HAS_DATA) {
if (conn->synchronous) {
- syncReadFromEth(conn->sessionSocket, optClampMSS);
+ syncReadFromEth(conn, conn->sessionSocket, optClampMSS);
} else {
- asyncReadFromEth(conn->sessionSocket, optClampMSS);
+ asyncReadFromEth(conn, conn->sessionSocket, optClampMSS);
}
}
#endif
@@ -642,7 +642,7 @@
/* Make sure this is a session packet before processing further */
type = etherType(&packet);
if (type == Eth_PPPOE_Discovery) {
- sessionDiscoveryPacket(&packet);
+ sessionDiscoveryPacket(conn, &packet);
} else if (type != Eth_PPPOE_Session) {
return;
}
@@ -767,7 +767,7 @@
/* Make sure this is a session packet before processing further */
type = etherType(&packet);
if (type == Eth_PPPOE_Discovery) {
- sessionDiscoveryPacket(&packet);
+ sessionDiscoveryPacket(conn, &packet);
} else if (type != Eth_PPPOE_Session) {
return;
}
|