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
2c71474b
Commit
2c71474b
authored
May 08, 2003
by
David S. Miller
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[NETFILTER]: Fix icmp_reply_translation args.
parent
9767ae13
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
8 additions
and
8 deletions
+8
-8
net/ipv4/netfilter/ip_fw_compat.c
net/ipv4/netfilter/ip_fw_compat.c
+2
-2
net/ipv4/netfilter/ip_fw_compat_masq.c
net/ipv4/netfilter/ip_fw_compat_masq.c
+6
-6
No files found.
net/ipv4/netfilter/ip_fw_compat.c
View file @
2c71474b
...
@@ -35,7 +35,7 @@ extern unsigned int
...
@@ -35,7 +35,7 @@ extern unsigned int
do_masquerade
(
struct
sk_buff
**
pskb
,
const
struct
net_device
*
dev
);
do_masquerade
(
struct
sk_buff
**
pskb
,
const
struct
net_device
*
dev
);
extern
unsigned
int
extern
unsigned
int
check_for_masq_error
(
struct
sk_buff
*
pskb
);
check_for_masq_error
(
struct
sk_buff
*
*
pskb
);
extern
unsigned
int
extern
unsigned
int
check_for_demasq
(
struct
sk_buff
**
pskb
);
check_for_demasq
(
struct
sk_buff
**
pskb
);
...
@@ -167,7 +167,7 @@ fw_in(unsigned int hooknum,
...
@@ -167,7 +167,7 @@ fw_in(unsigned int hooknum,
/* Handle ICMP errors from client here */
/* Handle ICMP errors from client here */
if
((
*
pskb
)
->
nh
.
iph
->
protocol
==
IPPROTO_ICMP
if
((
*
pskb
)
->
nh
.
iph
->
protocol
==
IPPROTO_ICMP
&&
(
*
pskb
)
->
nfct
)
&&
(
*
pskb
)
->
nfct
)
check_for_masq_error
(
*
pskb
);
check_for_masq_error
(
pskb
);
}
}
return
NF_ACCEPT
;
return
NF_ACCEPT
;
...
...
net/ipv4/netfilter/ip_fw_compat_masq.c
View file @
2c71474b
...
@@ -103,19 +103,19 @@ do_masquerade(struct sk_buff **pskb, const struct net_device *dev)
...
@@ -103,19 +103,19 @@ do_masquerade(struct sk_buff **pskb, const struct net_device *dev)
}
}
void
void
check_for_masq_error
(
struct
sk_buff
*
skb
)
check_for_masq_error
(
struct
sk_buff
*
*
p
skb
)
{
{
enum
ip_conntrack_info
ctinfo
;
enum
ip_conntrack_info
ctinfo
;
struct
ip_conntrack
*
ct
;
struct
ip_conntrack
*
ct
;
ct
=
ip_conntrack_get
(
skb
,
&
ctinfo
);
ct
=
ip_conntrack_get
(
*
p
skb
,
&
ctinfo
);
/* Wouldn't be here if not tracked already => masq'ed ICMP
/* Wouldn't be here if not tracked already => masq'ed ICMP
ping or error related to masq'd connection */
ping or error related to masq'd connection */
IP_NF_ASSERT
(
ct
);
IP_NF_ASSERT
(
ct
);
if
(
ctinfo
==
IP_CT_RELATED
)
{
if
(
ctinfo
==
IP_CT_RELATED
)
{
icmp_reply_translation
(
skb
,
ct
,
NF_IP_PRE_ROUTING
,
icmp_reply_translation
(
p
skb
,
ct
,
NF_IP_PRE_ROUTING
,
CTINFO2DIR
(
ctinfo
));
CTINFO2DIR
(
ctinfo
));
icmp_reply_translation
(
skb
,
ct
,
NF_IP_POST_ROUTING
,
icmp_reply_translation
(
p
skb
,
ct
,
NF_IP_POST_ROUTING
,
CTINFO2DIR
(
ctinfo
));
CTINFO2DIR
(
ctinfo
));
}
}
}
}
...
@@ -152,10 +152,10 @@ check_for_demasq(struct sk_buff **pskb)
...
@@ -152,10 +152,10 @@ check_for_demasq(struct sk_buff **pskb)
&&
skb_linearize
(
*
pskb
,
GFP_ATOMIC
)
!=
0
)
&&
skb_linearize
(
*
pskb
,
GFP_ATOMIC
)
!=
0
)
return
NF_DROP
;
return
NF_DROP
;
icmp_reply_translation
(
*
pskb
,
ct
,
icmp_reply_translation
(
pskb
,
ct
,
NF_IP_PRE_ROUTING
,
NF_IP_PRE_ROUTING
,
CTINFO2DIR
(
ctinfo
));
CTINFO2DIR
(
ctinfo
));
icmp_reply_translation
(
*
pskb
,
ct
,
icmp_reply_translation
(
pskb
,
ct
,
NF_IP_POST_ROUTING
,
NF_IP_POST_ROUTING
,
CTINFO2DIR
(
ctinfo
));
CTINFO2DIR
(
ctinfo
));
}
}
...
...
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