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
Kirill Smelkov
linux
Commits
599d98aa
Commit
599d98aa
authored
Jun 04, 2003
by
Steven Whitehouse
Committed by
David S. Miller
Jun 04, 2003
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[AX25]: Sanitize ax25 netdevice private handling.
parent
be0b01c4
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
9 additions
and
16 deletions
+9
-16
include/linux/netdevice.h
include/linux/netdevice.h
+1
-0
include/net/ax25.h
include/net/ax25.h
+6
-1
net/ax25/ax25_dev.c
net/ax25/ax25_dev.c
+2
-15
No files found.
include/linux/netdevice.h
View file @
599d98aa
...
@@ -333,6 +333,7 @@ struct net_device
...
@@ -333,6 +333,7 @@ struct net_device
void
*
dn_ptr
;
/* DECnet specific data */
void
*
dn_ptr
;
/* DECnet specific data */
void
*
ip6_ptr
;
/* IPv6 specific data */
void
*
ip6_ptr
;
/* IPv6 specific data */
void
*
ec_ptr
;
/* Econet specific data */
void
*
ec_ptr
;
/* Econet specific data */
void
*
ax25_ptr
;
/* AX.25 specific data */
struct
list_head
poll_list
;
/* Link to poll list */
struct
list_head
poll_list
;
/* Link to poll list */
int
quota
;
int
quota
;
...
...
include/net/ax25.h
View file @
599d98aa
...
@@ -233,7 +233,12 @@ extern void ax25_digi_invert(ax25_digi *, ax25_digi *);
...
@@ -233,7 +233,12 @@ extern void ax25_digi_invert(ax25_digi *, ax25_digi *);
/* ax25_dev.c */
/* ax25_dev.c */
extern
ax25_dev
*
ax25_dev_list
;
extern
ax25_dev
*
ax25_dev_list
;
extern
spinlock_t
ax25_dev_lock
;
extern
spinlock_t
ax25_dev_lock
;
extern
ax25_dev
*
ax25_dev_ax25dev
(
struct
net_device
*
);
static
inline
ax25_dev
*
ax25_dev_ax25dev
(
struct
net_device
*
dev
)
{
return
dev
->
ax25_ptr
;
}
extern
ax25_dev
*
ax25_addr_ax25dev
(
ax25_address
*
);
extern
ax25_dev
*
ax25_addr_ax25dev
(
ax25_address
*
);
extern
void
ax25_dev_device_up
(
struct
net_device
*
);
extern
void
ax25_dev_device_up
(
struct
net_device
*
);
extern
void
ax25_dev_device_down
(
struct
net_device
*
);
extern
void
ax25_dev_device_down
(
struct
net_device
*
);
...
...
net/ax25/ax25_dev.c
View file @
599d98aa
...
@@ -34,21 +34,6 @@
...
@@ -34,21 +34,6 @@
ax25_dev
*
ax25_dev_list
;
ax25_dev
*
ax25_dev_list
;
spinlock_t
ax25_dev_lock
=
SPIN_LOCK_UNLOCKED
;
spinlock_t
ax25_dev_lock
=
SPIN_LOCK_UNLOCKED
;
ax25_dev
*
ax25_dev_ax25dev
(
struct
net_device
*
dev
)
{
ax25_dev
*
ax25_dev
,
*
res
=
NULL
;
spin_lock_bh
(
&
ax25_dev_lock
);
for
(
ax25_dev
=
ax25_dev_list
;
ax25_dev
!=
NULL
;
ax25_dev
=
ax25_dev
->
next
)
if
(
ax25_dev
->
dev
==
dev
)
{
res
=
ax25_dev
;
break
;
}
spin_unlock_bh
(
&
ax25_dev_lock
);
return
res
;
}
ax25_dev
*
ax25_addr_ax25dev
(
ax25_address
*
addr
)
ax25_dev
*
ax25_addr_ax25dev
(
ax25_address
*
addr
)
{
{
ax25_dev
*
ax25_dev
,
*
res
=
NULL
;
ax25_dev
*
ax25_dev
,
*
res
=
NULL
;
...
@@ -80,6 +65,7 @@ void ax25_dev_device_up(struct net_device *dev)
...
@@ -80,6 +65,7 @@ void ax25_dev_device_up(struct net_device *dev)
memset
(
ax25_dev
,
0x00
,
sizeof
(
*
ax25_dev
));
memset
(
ax25_dev
,
0x00
,
sizeof
(
*
ax25_dev
));
dev
->
ax25_ptr
=
ax25_dev
;
ax25_dev
->
dev
=
dev
;
ax25_dev
->
dev
=
dev
;
ax25_dev
->
forward
=
NULL
;
ax25_dev
->
forward
=
NULL
;
...
@@ -152,6 +138,7 @@ void ax25_dev_device_down(struct net_device *dev)
...
@@ -152,6 +138,7 @@ void ax25_dev_device_down(struct net_device *dev)
s
=
s
->
next
;
s
=
s
->
next
;
}
}
spin_unlock_bh
(
&
ax25_dev_lock
);
spin_unlock_bh
(
&
ax25_dev_lock
);
dev
->
ax25_ptr
=
NULL
;
ax25_register_sysctl
();
ax25_register_sysctl
();
}
}
...
...
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