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
069fa23e
Commit
069fa23e
authored
Nov 13, 2004
by
Patrick McHardy
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[NETFILTER]: Handle nonlinear skbs in ip_queue/ip6_queue
Signed-off-by:
Patrick McHardy
<
kaber@trash.net
>
parent
2d2ddfcd
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
8 additions
and
2 deletions
+8
-2
net/ipv4/netfilter/ip_queue.c
net/ipv4/netfilter/ip_queue.c
+4
-1
net/ipv6/netfilter/ip6_queue.c
net/ipv6/netfilter/ip6_queue.c
+4
-1
No files found.
net/ipv4/netfilter/ip_queue.c
View file @
069fa23e
...
@@ -257,7 +257,8 @@ ipq_build_packet_message(struct ipq_queue_entry *entry, int *errp)
...
@@ -257,7 +257,8 @@ ipq_build_packet_message(struct ipq_queue_entry *entry, int *errp)
}
}
if
(
data_len
)
if
(
data_len
)
memcpy
(
pmsg
->
payload
,
entry
->
skb
->
data
,
data_len
);
if
(
skb_copy_bits
(
entry
->
skb
,
0
,
pmsg
->
payload
,
data_len
))
BUG
();
nlh
->
nlmsg_len
=
skb
->
tail
-
old_tail
;
nlh
->
nlmsg_len
=
skb
->
tail
-
old_tail
;
return
skb
;
return
skb
;
...
@@ -362,6 +363,8 @@ ipq_mangle_ipv4(ipq_verdict_msg_t *v, struct ipq_queue_entry *e)
...
@@ -362,6 +363,8 @@ ipq_mangle_ipv4(ipq_verdict_msg_t *v, struct ipq_queue_entry *e)
}
}
skb_put
(
e
->
skb
,
diff
);
skb_put
(
e
->
skb
,
diff
);
}
}
if
(
!
skb_ip_make_writable
(
&
e
->
skb
,
v
->
data_len
))
return
-
ENOMEM
;
memcpy
(
e
->
skb
->
data
,
v
->
payload
,
v
->
data_len
);
memcpy
(
e
->
skb
->
data
,
v
->
payload
,
v
->
data_len
);
e
->
skb
->
nfcache
|=
NFC_ALTERED
;
e
->
skb
->
nfcache
|=
NFC_ALTERED
;
...
...
net/ipv6/netfilter/ip6_queue.c
View file @
069fa23e
...
@@ -262,7 +262,8 @@ ipq_build_packet_message(struct ipq_queue_entry *entry, int *errp)
...
@@ -262,7 +262,8 @@ ipq_build_packet_message(struct ipq_queue_entry *entry, int *errp)
}
}
if
(
data_len
)
if
(
data_len
)
memcpy
(
pmsg
->
payload
,
entry
->
skb
->
data
,
data_len
);
if
(
skb_copy_bits
(
entry
->
skb
,
0
,
pmsg
->
payload
,
data_len
))
BUG
();
nlh
->
nlmsg_len
=
skb
->
tail
-
old_tail
;
nlh
->
nlmsg_len
=
skb
->
tail
-
old_tail
;
return
skb
;
return
skb
;
...
@@ -366,6 +367,8 @@ ipq_mangle_ipv6(ipq_verdict_msg_t *v, struct ipq_queue_entry *e)
...
@@ -366,6 +367,8 @@ ipq_mangle_ipv6(ipq_verdict_msg_t *v, struct ipq_queue_entry *e)
}
}
skb_put
(
e
->
skb
,
diff
);
skb_put
(
e
->
skb
,
diff
);
}
}
if
(
!
skb_ip_make_writable
(
&
e
->
skb
,
v
->
data_len
))
return
-
ENOMEM
;
memcpy
(
e
->
skb
->
data
,
v
->
payload
,
v
->
data_len
);
memcpy
(
e
->
skb
->
data
,
v
->
payload
,
v
->
data_len
);
e
->
skb
->
nfcache
|=
NFC_ALTERED
;
e
->
skb
->
nfcache
|=
NFC_ALTERED
;
...
...
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