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
f685645b
Commit
f685645b
authored
Dec 30, 2003
by
David S. Miller
Browse files
Options
Browse Files
Download
Plain Diff
Merge nuts.ninka.net:/disk1/davem/BK/netleak-2.5
into nuts.ninka.net:/disk1/davem/BK/net-2.6
parents
a077e99d
6bb00924
Changes
5
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
7 additions
and
9 deletions
+7
-9
include/linux/netfilter_bridge.h
include/linux/netfilter_bridge.h
+3
-3
include/linux/skbuff.h
include/linux/skbuff.h
+1
-1
net/bridge/br_netfilter.c
net/bridge/br_netfilter.c
+1
-5
net/ipv4/ip_output.c
net/ipv4/ip_output.c
+1
-0
net/ipv6/ip6_output.c
net/ipv6/ip6_output.c
+1
-0
No files found.
include/linux/netfilter_bridge.h
View file @
f685645b
...
...
@@ -72,10 +72,10 @@ void nf_bridge_maybe_copy_header(struct sk_buff *skb)
{
if
(
skb
->
nf_bridge
)
{
if
(
skb
->
protocol
==
__constant_htons
(
ETH_P_8021Q
))
{
memcpy
(
skb
->
data
-
18
,
skb
->
nf_bridge
->
hh
,
18
);
memcpy
(
skb
->
data
-
18
,
skb
->
nf_bridge
->
data
,
18
);
skb_push
(
skb
,
4
);
}
else
memcpy
(
skb
->
data
-
16
,
skb
->
nf_bridge
->
hh
,
16
);
memcpy
(
skb
->
data
-
16
,
skb
->
nf_bridge
->
data
,
16
);
}
}
...
...
@@ -87,7 +87,7 @@ void nf_bridge_save_header(struct sk_buff *skb)
if
(
skb
->
protocol
==
__constant_htons
(
ETH_P_8021Q
))
header_size
=
18
;
memcpy
(
skb
->
nf_bridge
->
hh
,
skb
->
data
-
header_size
,
header_size
);
memcpy
(
skb
->
nf_bridge
->
data
,
skb
->
data
-
header_size
,
header_size
);
}
struct
bridge_skb_cb
{
...
...
include/linux/skbuff.h
View file @
f685645b
...
...
@@ -107,7 +107,7 @@ struct nf_bridge_info {
struct
net_device
*
netoutdev
;
#endif
unsigned
int
mask
;
unsigned
long
hh
[
32
/
sizeof
(
unsigned
long
)];
unsigned
long
data
[
32
/
sizeof
(
unsigned
long
)];
};
#endif
...
...
net/bridge/br_netfilter.c
View file @
f685645b
...
...
@@ -41,11 +41,9 @@
#define skb_origaddr(skb) (((struct bridge_skb_cb *) \
(skb->
cb
))->daddr.ipv4)
(skb->
nf_bridge->data
))->daddr.ipv4)
#define store_orig_dstaddr(skb) (skb_origaddr(skb) = (skb)->nh.iph->daddr)
#define dnat_took_place(skb) (skb_origaddr(skb) != (skb)->nh.iph->daddr)
#define clear_cb(skb) (memset(&skb_origaddr(skb), 0, \
sizeof(struct bridge_skb_cb)))
#define has_bridge_parent(device) ((device)->br_port != NULL)
#define bridge_parent(device) ((device)->br_port->br->dev)
...
...
@@ -216,7 +214,6 @@ static int br_nf_pre_routing_finish(struct sk_buff *skb)
*/
nf_bridge
->
mask
|=
BRNF_BRIDGED_DNAT
;
skb
->
dev
=
nf_bridge
->
physindev
;
clear_cb
(
skb
);
if
(
skb
->
protocol
==
__constant_htons
(
ETH_P_8021Q
))
{
skb_push
(
skb
,
VLAN_HLEN
);
...
...
@@ -237,7 +234,6 @@ static int br_nf_pre_routing_finish(struct sk_buff *skb)
dst_hold
(
skb
->
dst
);
}
clear_cb
(
skb
);
skb
->
dev
=
nf_bridge
->
physindev
;
if
(
skb
->
protocol
==
__constant_htons
(
ETH_P_8021Q
))
{
skb_push
(
skb
,
VLAN_HLEN
);
...
...
net/ipv4/ip_output.c
View file @
f685645b
...
...
@@ -417,6 +417,7 @@ static void ip_copy_metadata(struct sk_buff *to, struct sk_buff *from)
to
->
nfct
=
from
->
nfct
;
nf_conntrack_get
(
to
->
nfct
);
#ifdef CONFIG_BRIDGE_NETFILTER
nf_bridge_put
(
to
->
nf_bridge
);
to
->
nf_bridge
=
from
->
nf_bridge
;
nf_bridge_get
(
to
->
nf_bridge
);
#endif
...
...
net/ipv6/ip6_output.c
View file @
f685645b
...
...
@@ -877,6 +877,7 @@ static void ip6_copy_metadata(struct sk_buff *to, struct sk_buff *from)
to
->
nfct
=
from
->
nfct
;
nf_conntrack_get
(
to
->
nfct
);
#ifdef CONFIG_BRIDGE_NETFILTER
nf_bridge_put
(
to
->
nf_bridge
);
to
->
nf_bridge
=
from
->
nf_bridge
;
nf_bridge_get
(
to
->
nf_bridge
);
#endif
...
...
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