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
998b620f
Commit
998b620f
authored
Oct 06, 2003
by
Julian Anastasov
Committed by
David S. Miller
Oct 06, 2003
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[IPVS]: remove some unused fields from the protocols
parent
cef2e35d
Changes
7
Show whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
15 additions
and
46 deletions
+15
-46
include/net/ip_vs.h
include/net/ip_vs.h
+4
-5
net/ipv4/ipvs/ip_vs_core.c
net/ipv4/ipvs/ip_vs_core.c
+2
-2
net/ipv4/ipvs/ip_vs_proto_ah.c
net/ipv4/ipvs/ip_vs_proto_ah.c
+3
-12
net/ipv4/ipvs/ip_vs_proto_esp.c
net/ipv4/ipvs/ip_vs_proto_esp.c
+2
-11
net/ipv4/ipvs/ip_vs_proto_icmp.c
net/ipv4/ipvs/ip_vs_proto_icmp.c
+0
-4
net/ipv4/ipvs/ip_vs_proto_tcp.c
net/ipv4/ipvs/ip_vs_proto_tcp.c
+2
-6
net/ipv4/ipvs/ip_vs_proto_udp.c
net/ipv4/ipvs/ip_vs_proto_udp.c
+2
-6
No files found.
include/net/ip_vs.h
View file @
998b620f
...
@@ -435,11 +435,7 @@ struct ip_vs_protocol {
...
@@ -435,11 +435,7 @@ struct ip_vs_protocol {
struct
ip_vs_protocol
*
next
;
struct
ip_vs_protocol
*
next
;
char
*
name
;
char
*
name
;
__u16
protocol
;
__u16
protocol
;
int
minhlen
;
int
minhlen_icmp
;
int
dont_defrag
;
int
dont_defrag
;
int
skip_nonexisting
;
int
slave
;
/* if controlled by others */
atomic_t
appcnt
;
/* counter of proto app incs */
atomic_t
appcnt
;
/* counter of proto app incs */
int
*
timeout_table
;
/* protocol timeout table */
int
*
timeout_table
;
/* protocol timeout table */
...
@@ -528,7 +524,10 @@ struct ip_vs_conn {
...
@@ -528,7 +524,10 @@ struct ip_vs_conn {
struct
ip_vs_dest
*
dest
;
/* real server */
struct
ip_vs_dest
*
dest
;
/* real server */
atomic_t
in_pkts
;
/* incoming packet counter */
atomic_t
in_pkts
;
/* incoming packet counter */
/* packet transmitter for different forwarding methods */
/* packet transmitter for different forwarding methods. If it
mangles the packet, it must return NF_DROP or NF_STOLEN, otherwise
this must be changed to a sk_buff **.
*/
int
(
*
packet_xmit
)(
struct
sk_buff
*
skb
,
struct
ip_vs_conn
*
cp
,
int
(
*
packet_xmit
)(
struct
sk_buff
*
skb
,
struct
ip_vs_conn
*
cp
,
struct
ip_vs_protocol
*
pp
);
struct
ip_vs_protocol
*
pp
);
...
...
net/ipv4/ipvs/ip_vs_core.c
View file @
998b620f
...
@@ -660,7 +660,7 @@ static int ip_vs_out_icmp(struct sk_buff **pskb, int *related)
...
@@ -660,7 +660,7 @@ static int ip_vs_out_icmp(struct sk_buff **pskb, int *related)
/* Is the embedded protocol header present? */
/* Is the embedded protocol header present? */
if
(
unlikely
(
ciph
.
frag_off
&
__constant_htons
(
IP_OFFSET
)
&&
if
(
unlikely
(
ciph
.
frag_off
&
__constant_htons
(
IP_OFFSET
)
&&
(
pp
->
minhlen
||
pp
->
dont_defrag
)
))
pp
->
dont_defrag
))
return
NF_ACCEPT
;
return
NF_ACCEPT
;
IP_VS_DBG_PKT
(
11
,
pp
,
skb
,
offset
,
"Checking outgoing ICMP for"
);
IP_VS_DBG_PKT
(
11
,
pp
,
skb
,
offset
,
"Checking outgoing ICMP for"
);
...
@@ -911,7 +911,7 @@ static int ip_vs_in_icmp(struct sk_buff **pskb, int *related)
...
@@ -911,7 +911,7 @@ static int ip_vs_in_icmp(struct sk_buff **pskb, int *related)
/* Is the embedded protocol header present? */
/* Is the embedded protocol header present? */
if
(
unlikely
(
ciph
.
frag_off
&
__constant_htons
(
IP_OFFSET
)
&&
if
(
unlikely
(
ciph
.
frag_off
&
__constant_htons
(
IP_OFFSET
)
&&
(
pp
->
minhlen
||
pp
->
dont_defrag
)
))
pp
->
dont_defrag
))
return
NF_ACCEPT
;
return
NF_ACCEPT
;
IP_VS_DBG_PKT
(
11
,
pp
,
skb
,
offset
,
"Checking incoming ICMP for"
);
IP_VS_DBG_PKT
(
11
,
pp
,
skb
,
offset
,
"Checking incoming ICMP for"
);
...
...
net/ipv4/ipvs/ip_vs_proto_ah.c
View file @
998b620f
...
@@ -69,11 +69,11 @@ ah_conn_in_get(const struct sk_buff *skb,
...
@@ -69,11 +69,11 @@ ah_conn_in_get(const struct sk_buff *skb,
if
(
!
cp
)
{
if
(
!
cp
)
{
/*
/*
* We are not sure if the packet is from our
* We are not sure if the packet is from our
* service, so
the caller should check skip_nonexisting
* service, so
our conn_schedule hook should return NF_ACCEPT
*/
*/
IP_VS_DBG
(
12
,
"Unknown ISAKMP entry for outin packet "
IP_VS_DBG
(
12
,
"Unknown ISAKMP entry for outin packet "
"%s%s %u.%u.%u.%u->%u.%u.%u.%u
\n
"
,
"%s%s %u.%u.%u.%u->%u.%u.%u.%u
\n
"
,
inverse
?
"ICMP+"
:
""
,
inverse
?
"ICMP+"
:
""
,
pp
->
name
,
pp
->
name
,
NIPQUAD
(
iph
->
saddr
),
NIPQUAD
(
iph
->
saddr
),
NIPQUAD
(
iph
->
daddr
));
NIPQUAD
(
iph
->
daddr
));
...
@@ -104,11 +104,6 @@ ah_conn_out_get(const struct sk_buff *skb, struct ip_vs_protocol *pp,
...
@@ -104,11 +104,6 @@ ah_conn_out_get(const struct sk_buff *skb, struct ip_vs_protocol *pp,
}
}
if
(
!
cp
)
{
if
(
!
cp
)
{
/*
* We are not sure if the packet is from our
* service, so the caller should check skip_nonexisting
* or our conn_schedule hook should return NF_ACCEPT
*/
IP_VS_DBG
(
12
,
"Unknown ISAKMP entry for inout packet "
IP_VS_DBG
(
12
,
"Unknown ISAKMP entry for inout packet "
"%s%s %u.%u.%u.%u->%u.%u.%u.%u
\n
"
,
"%s%s %u.%u.%u.%u->%u.%u.%u.%u
\n
"
,
inverse
?
"ICMP+"
:
""
,
inverse
?
"ICMP+"
:
""
,
...
@@ -167,11 +162,7 @@ static void ah_exit(struct ip_vs_protocol *pp)
...
@@ -167,11 +162,7 @@ static void ah_exit(struct ip_vs_protocol *pp)
struct
ip_vs_protocol
ip_vs_protocol_ah
=
{
struct
ip_vs_protocol
ip_vs_protocol_ah
=
{
.
name
=
"AH"
,
.
name
=
"AH"
,
.
protocol
=
IPPROTO_AH
,
.
protocol
=
IPPROTO_AH
,
.
minhlen
=
0
,
.
minhlen_icmp
=
0
,
.
dont_defrag
=
1
,
.
dont_defrag
=
1
,
.
skip_nonexisting
=
1
,
.
slave
=
1
,
.
init
=
ah_init
,
.
init
=
ah_init
,
.
exit
=
ah_exit
,
.
exit
=
ah_exit
,
.
conn_schedule
=
ah_conn_schedule
,
.
conn_schedule
=
ah_conn_schedule
,
...
@@ -179,11 +170,11 @@ struct ip_vs_protocol ip_vs_protocol_ah = {
...
@@ -179,11 +170,11 @@ struct ip_vs_protocol ip_vs_protocol_ah = {
.
conn_out_get
=
ah_conn_out_get
,
.
conn_out_get
=
ah_conn_out_get
,
.
snat_handler
=
NULL
,
.
snat_handler
=
NULL
,
.
dnat_handler
=
NULL
,
.
dnat_handler
=
NULL
,
.
csum_check
=
NULL
,
.
state_transition
=
NULL
,
.
state_transition
=
NULL
,
.
register_app
=
NULL
,
.
register_app
=
NULL
,
.
unregister_app
=
NULL
,
.
unregister_app
=
NULL
,
.
app_conn_bind
=
NULL
,
.
app_conn_bind
=
NULL
,
.
csum_check
=
NULL
,
.
debug_packet
=
ah_debug_packet
,
.
debug_packet
=
ah_debug_packet
,
.
timeout_change
=
NULL
,
/* ISAKMP */
.
timeout_change
=
NULL
,
/* ISAKMP */
.
set_state_timeout
=
NULL
,
.
set_state_timeout
=
NULL
,
...
...
net/ipv4/ipvs/ip_vs_proto_esp.c
View file @
998b620f
...
@@ -69,7 +69,7 @@ esp_conn_in_get(const struct sk_buff *skb,
...
@@ -69,7 +69,7 @@ esp_conn_in_get(const struct sk_buff *skb,
if
(
!
cp
)
{
if
(
!
cp
)
{
/*
/*
* We are not sure if the packet is from our
* We are not sure if the packet is from our
* service, so
the caller should check skip_nonexisting
* service, so
our conn_schedule hook should return NF_ACCEPT
*/
*/
IP_VS_DBG
(
12
,
"Unknown ISAKMP entry for outin packet "
IP_VS_DBG
(
12
,
"Unknown ISAKMP entry for outin packet "
"%s%s %u.%u.%u.%u->%u.%u.%u.%u
\n
"
,
"%s%s %u.%u.%u.%u->%u.%u.%u.%u
\n
"
,
...
@@ -104,14 +104,9 @@ esp_conn_out_get(const struct sk_buff *skb, struct ip_vs_protocol *pp,
...
@@ -104,14 +104,9 @@ esp_conn_out_get(const struct sk_buff *skb, struct ip_vs_protocol *pp,
}
}
if
(
!
cp
)
{
if
(
!
cp
)
{
/*
* We are not sure if the packet is from our
* service, so the caller should check skip_nonexisting
* or our conn_schedule hook should return NF_ACCEPT
*/
IP_VS_DBG
(
12
,
"Unknown ISAKMP entry for inout packet "
IP_VS_DBG
(
12
,
"Unknown ISAKMP entry for inout packet "
"%s%s %u.%u.%u.%u->%u.%u.%u.%u
\n
"
,
"%s%s %u.%u.%u.%u->%u.%u.%u.%u
\n
"
,
inverse
?
"ICMP+"
:
""
,
inverse
?
"ICMP+"
:
""
,
pp
->
name
,
pp
->
name
,
NIPQUAD
(
iph
->
saddr
),
NIPQUAD
(
iph
->
saddr
),
NIPQUAD
(
iph
->
daddr
));
NIPQUAD
(
iph
->
daddr
));
...
@@ -166,11 +161,7 @@ static void esp_exit(struct ip_vs_protocol *pp)
...
@@ -166,11 +161,7 @@ static void esp_exit(struct ip_vs_protocol *pp)
struct
ip_vs_protocol
ip_vs_protocol_esp
=
{
struct
ip_vs_protocol
ip_vs_protocol_esp
=
{
.
name
=
"ESP"
,
.
name
=
"ESP"
,
.
protocol
=
IPPROTO_ESP
,
.
protocol
=
IPPROTO_ESP
,
.
minhlen
=
0
,
.
minhlen_icmp
=
0
,
.
dont_defrag
=
1
,
.
dont_defrag
=
1
,
.
skip_nonexisting
=
1
,
.
slave
=
1
,
.
init
=
esp_init
,
.
init
=
esp_init
,
.
exit
=
esp_exit
,
.
exit
=
esp_exit
,
.
conn_schedule
=
esp_conn_schedule
,
.
conn_schedule
=
esp_conn_schedule
,
...
...
net/ipv4/ipvs/ip_vs_proto_icmp.c
View file @
998b620f
...
@@ -163,11 +163,7 @@ static void icmp_exit(struct ip_vs_protocol *pp)
...
@@ -163,11 +163,7 @@ static void icmp_exit(struct ip_vs_protocol *pp)
struct
ip_vs_protocol
ip_vs_protocol_icmp
=
{
struct
ip_vs_protocol
ip_vs_protocol_icmp
=
{
.
name
=
"ICMP"
,
.
name
=
"ICMP"
,
.
protocol
=
IPPROTO_ICMP
,
.
protocol
=
IPPROTO_ICMP
,
.
minhlen
=
sizeof
(
struct
icmphdr
),
.
minhlen_icmp
=
8
,
.
dont_defrag
=
0
,
.
dont_defrag
=
0
,
.
skip_nonexisting
=
0
,
.
slave
=
0
,
.
init
=
icmp_init
,
.
init
=
icmp_init
,
.
exit
=
icmp_exit
,
.
exit
=
icmp_exit
,
.
conn_schedule
=
icmp_conn_schedule
,
.
conn_schedule
=
icmp_conn_schedule
,
...
...
net/ipv4/ipvs/ip_vs_proto_tcp.c
View file @
998b620f
...
@@ -132,7 +132,7 @@ tcp_snat_handler(struct sk_buff **pskb,
...
@@ -132,7 +132,7 @@ tcp_snat_handler(struct sk_buff **pskb,
if
(
unlikely
(
cp
->
app
!=
NULL
))
{
if
(
unlikely
(
cp
->
app
!=
NULL
))
{
/* Some checks before mangling */
/* Some checks before mangling */
if
(
pp
->
csum_check
&&
!
pp
->
slave
&&
!
pp
->
csum_check
(
*
pskb
,
pp
))
if
(
pp
->
csum_check
&&
!
pp
->
csum_check
(
*
pskb
,
pp
))
return
0
;
return
0
;
/* Call application helper if needed */
/* Call application helper if needed */
...
@@ -180,7 +180,7 @@ tcp_dnat_handler(struct sk_buff **pskb,
...
@@ -180,7 +180,7 @@ tcp_dnat_handler(struct sk_buff **pskb,
if
(
unlikely
(
cp
->
app
!=
NULL
))
{
if
(
unlikely
(
cp
->
app
!=
NULL
))
{
/* Some checks before mangling */
/* Some checks before mangling */
if
(
pp
->
csum_check
&&
!
pp
->
slave
&&
!
pp
->
csum_check
(
*
pskb
,
pp
))
if
(
pp
->
csum_check
&&
!
pp
->
csum_check
(
*
pskb
,
pp
))
return
0
;
return
0
;
/*
/*
...
@@ -614,11 +614,7 @@ static void tcp_exit(struct ip_vs_protocol *pp)
...
@@ -614,11 +614,7 @@ static void tcp_exit(struct ip_vs_protocol *pp)
struct
ip_vs_protocol
ip_vs_protocol_tcp
=
{
struct
ip_vs_protocol
ip_vs_protocol_tcp
=
{
.
name
=
"TCP"
,
.
name
=
"TCP"
,
.
protocol
=
IPPROTO_TCP
,
.
protocol
=
IPPROTO_TCP
,
.
minhlen
=
sizeof
(
struct
tcphdr
),
.
minhlen_icmp
=
8
,
.
dont_defrag
=
0
,
.
dont_defrag
=
0
,
.
skip_nonexisting
=
0
,
.
slave
=
0
,
.
appcnt
=
ATOMIC_INIT
(
0
),
.
appcnt
=
ATOMIC_INIT
(
0
),
.
init
=
tcp_init
,
.
init
=
tcp_init
,
.
exit
=
tcp_exit
,
.
exit
=
tcp_exit
,
...
...
net/ipv4/ipvs/ip_vs_proto_udp.c
View file @
998b620f
...
@@ -133,7 +133,7 @@ udp_snat_handler(struct sk_buff **pskb,
...
@@ -133,7 +133,7 @@ udp_snat_handler(struct sk_buff **pskb,
if
(
unlikely
(
cp
->
app
!=
NULL
))
{
if
(
unlikely
(
cp
->
app
!=
NULL
))
{
/* Some checks before mangling */
/* Some checks before mangling */
if
(
pp
->
csum_check
&&
!
pp
->
slave
&&
!
pp
->
csum_check
(
*
pskb
,
pp
))
if
(
pp
->
csum_check
&&
!
pp
->
csum_check
(
*
pskb
,
pp
))
return
0
;
return
0
;
/*
/*
...
@@ -187,7 +187,7 @@ udp_dnat_handler(struct sk_buff **pskb,
...
@@ -187,7 +187,7 @@ udp_dnat_handler(struct sk_buff **pskb,
if
(
unlikely
(
cp
->
app
!=
NULL
))
{
if
(
unlikely
(
cp
->
app
!=
NULL
))
{
/* Some checks before mangling */
/* Some checks before mangling */
if
(
pp
->
csum_check
&&
!
pp
->
slave
&&
!
pp
->
csum_check
(
*
pskb
,
pp
))
if
(
pp
->
csum_check
&&
!
pp
->
csum_check
(
*
pskb
,
pp
))
return
0
;
return
0
;
/*
/*
...
@@ -401,11 +401,7 @@ static void udp_exit(struct ip_vs_protocol *pp)
...
@@ -401,11 +401,7 @@ static void udp_exit(struct ip_vs_protocol *pp)
struct
ip_vs_protocol
ip_vs_protocol_udp
=
{
struct
ip_vs_protocol
ip_vs_protocol_udp
=
{
.
name
=
"UDP"
,
.
name
=
"UDP"
,
.
protocol
=
IPPROTO_UDP
,
.
protocol
=
IPPROTO_UDP
,
.
minhlen
=
sizeof
(
struct
udphdr
),
.
minhlen_icmp
=
8
,
.
dont_defrag
=
0
,
.
dont_defrag
=
0
,
.
skip_nonexisting
=
0
,
.
slave
=
0
,
.
init
=
udp_init
,
.
init
=
udp_init
,
.
exit
=
udp_exit
,
.
exit
=
udp_exit
,
.
conn_schedule
=
udp_conn_schedule
,
.
conn_schedule
=
udp_conn_schedule
,
...
...
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