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
e39aa73c
Commit
e39aa73c
authored
Aug 04, 2002
by
Ralf Bächle
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Implement reference counting for routes.
parent
6916457b
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
5 deletions
+9
-5
net/ax25/ax25_ip.c
net/ax25/ax25_ip.c
+9
-5
No files found.
net/ax25/ax25_ip.c
View file @
e39aa73c
...
@@ -127,8 +127,9 @@ int ax25_rebuild_header(struct sk_buff *skb)
...
@@ -127,8 +127,9 @@ int ax25_rebuild_header(struct sk_buff *skb)
if
(
dev
==
NULL
)
if
(
dev
==
NULL
)
dev
=
skb
->
dev
;
dev
=
skb
->
dev
;
if
((
ax25_dev
=
ax25_dev_ax25dev
(
dev
))
==
NULL
)
if
((
ax25_dev
=
ax25_dev_ax25dev
(
dev
))
==
NULL
)
{
return
1
;
goto
put
;
}
if
(
bp
[
16
]
==
AX25_P_IP
)
{
if
(
bp
[
16
]
==
AX25_P_IP
)
{
if
(
route
->
ip_mode
==
'V'
||
(
route
->
ip_mode
==
' '
&&
ax25_dev
->
values
[
AX25_VALUES_IPDEFMODE
]))
{
if
(
route
->
ip_mode
==
'V'
||
(
route
->
ip_mode
==
' '
&&
ax25_dev
->
values
[
AX25_VALUES_IPDEFMODE
]))
{
...
@@ -153,7 +154,7 @@ int ax25_rebuild_header(struct sk_buff *skb)
...
@@ -153,7 +154,7 @@ int ax25_rebuild_header(struct sk_buff *skb)
if
((
ourskb
=
skb_copy
(
skb
,
GFP_ATOMIC
))
==
NULL
)
{
if
((
ourskb
=
skb_copy
(
skb
,
GFP_ATOMIC
))
==
NULL
)
{
kfree_skb
(
skb
);
kfree_skb
(
skb
);
return
1
;
goto
put
;
}
}
if
(
skb
->
sk
!=
NULL
)
if
(
skb
->
sk
!=
NULL
)
...
@@ -170,7 +171,7 @@ int ax25_rebuild_header(struct sk_buff *skb)
...
@@ -170,7 +171,7 @@ int ax25_rebuild_header(struct sk_buff *skb)
ax25_send_frame
(
ourskb
,
ax25_dev
->
values
[
AX25_VALUES_PACLEN
],
&
src_c
,
ax25_send_frame
(
ourskb
,
ax25_dev
->
values
[
AX25_VALUES_PACLEN
],
&
src_c
,
&
dst_c
,
route
->
digipeat
,
dev
);
&
dst_c
,
route
->
digipeat
,
dev
);
return
1
;
goto
put
;
}
}
}
}
...
@@ -187,7 +188,7 @@ int ax25_rebuild_header(struct sk_buff *skb)
...
@@ -187,7 +188,7 @@ int ax25_rebuild_header(struct sk_buff *skb)
if
(
route
->
digipeat
!=
NULL
)
{
if
(
route
->
digipeat
!=
NULL
)
{
if
((
ourskb
=
ax25_rt_build_path
(
skb
,
src
,
dst
,
route
->
digipeat
))
==
NULL
)
{
if
((
ourskb
=
ax25_rt_build_path
(
skb
,
src
,
dst
,
route
->
digipeat
))
==
NULL
)
{
kfree_skb
(
skb
);
kfree_skb
(
skb
);
return
1
;
goto
put
;
}
}
skb
=
ourskb
;
skb
=
ourskb
;
...
@@ -197,6 +198,9 @@ int ax25_rebuild_header(struct sk_buff *skb)
...
@@ -197,6 +198,9 @@ int ax25_rebuild_header(struct sk_buff *skb)
ax25_queue_xmit
(
skb
);
ax25_queue_xmit
(
skb
);
put:
ax25_put_route
(
route
);
return
1
;
return
1
;
}
}
...
...
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