Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
L
linux
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
linux
Commits
dfc0a507
Commit
dfc0a507
authored
Dec 22, 2002
by
Michal Ostrowski
Committed by
David S. Miller
Dec 22, 2002
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[PPPOE]: Fix connect handling.
parent
27114580
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
38 additions
and
33 deletions
+38
-33
drivers/net/Kconfig
drivers/net/Kconfig
+5
-3
drivers/net/pppoe.c
drivers/net/pppoe.c
+24
-21
drivers/net/pppox.c
drivers/net/pppox.c
+9
-9
No files found.
drivers/net/Kconfig
View file @
dfc0a507
...
...
@@ -2028,9 +2028,11 @@ config PPPOE
help
Support for PPP over Ethernet.
This driver requires a specially patched pppd daemon. The patch to
pppd, along with binaries of a patched pppd package can be found at:
<http://www.shoshin.uwaterloo.ca/~mostrows/>.
This driver requires the latest version of pppd from the CVS
repository at cvs.samba.org. Alternatively, see the
RoaringPenguin package (http://www.roaringpenguin.com/pppoe)
which contains instruction on how to use this driver (under
the heading "Kernel mode PPPoE").
config PPPOATM
tristate "PPP over ATM"
...
...
drivers/net/pppoe.c
View file @
dfc0a507
...
...
@@ -5,7 +5,7 @@
* PPPoE --- PPP over Ethernet (RFC 2516)
*
*
* Version:
0.6.11
* Version:
0.7.0
*
* 220102 : Fix module use count on failure in pppoe_create, pppox_sk -acme
* 030700 : Fixed connect logic to allow for disconnect.
...
...
@@ -36,7 +36,8 @@
* from interrupts. Thus, we mark the socket as a ZOMBIE
* and do the unregistration later.
* 081002 : seq_file support for proc stuff -acme
*
* 111602 : Merge all 2.4 fixes into 2.5/2.6 tree. Label 2.5/2.6
* as version 0.7. Spacing cleanup.
* Author: Michal Ostrowski <mostrows@speakeasy.net>
* Contributors:
* Arnaldo Carvalho de Melo <acme@conectiva.com.br>
...
...
@@ -443,8 +444,10 @@ static int pppoe_disc_rcv(struct sk_buff *skb,
* what kind of SKB it is during backlog rcv.
*/
if
(
sock_owned_by_user
(
sk
)
==
0
)
{
/* We're no longer connect at the PPPOE layer,
* and must wait for ppp channel to disconnect us.
*/
sk
->
state
=
PPPOX_ZOMBIE
;
pppox_unbind_sock
(
sk
);
}
bh_unlock_sock
(
sk
);
...
...
@@ -583,8 +586,7 @@ int pppoe_connect(struct socket *sock, struct sockaddr *uservaddr,
if
((
sk
->
state
&
PPPOX_CONNECTED
)
&&
sp
->
sa_addr
.
pppoe
.
sid
)
goto
end
;
/* Check for already disconnected sockets,
on attempts to disconnect */
/* Check for already disconnected sockets, on attempts to disconnect */
error
=
-
EALREADY
;
if
((
sk
->
state
&
PPPOX_DEAD
)
&&
!
sp
->
sa_addr
.
pppoe
.
sid
)
goto
end
;
...
...
@@ -596,6 +598,7 @@ int pppoe_connect(struct socket *sock, struct sockaddr *uservaddr,
/* Delete the old binding */
delete_item
(
po
->
pppoe_pa
.
sid
,
po
->
pppoe_pa
.
remote
);
if
(
po
->
pppoe_dev
)
dev_put
(
po
->
pppoe_dev
);
memset
(
po
,
0
,
sizeof
(
struct
pppox_opt
));
...
...
drivers/net/pppox.c
View file @
dfc0a507
...
...
@@ -5,9 +5,9 @@
* PPPoE --- PPP over Ethernet (RFC 2516)
*
*
* Version: 0.5.
1
* Version: 0.5.
2
*
* Author: Michal Ostrowski <mostrows@s
tyx.uwaterloo.ca
>
* Author: Michal Ostrowski <mostrows@s
peakeasy.net
>
*
* 051000 : Initialization cleanup
*
...
...
@@ -65,9 +65,9 @@ void pppox_unbind_sock(struct sock *sk)
{
/* Clear connection to ppp device, if attached. */
if
(
sk
->
state
&
PPPOX_BOUND
)
{
if
(
sk
->
state
&
(
PPPOX_BOUND
|
PPPOX_ZOMBIE
)
)
{
ppp_unregister_channel
(
&
pppox_sk
(
sk
)
->
chan
);
sk
->
state
&=
~
PPPOX_BOUN
D
;
sk
->
state
=
PPPOX_DEA
D
;
}
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment