Skip to content

Commit

Permalink
netfilter: ipvs: use NFPROTO values for NF_HOOK invocation
Browse files Browse the repository at this point in the history
Semantic patch:
// <smpl>
@@
@@
 IP_VS_XMIT(
-PF_INET6,
+NFPROTO_IPV6,
 ...)

@@
@@
 IP_VS_XMIT(
-PF_INET,
+NFPROTO_IPV4,
 ...)
// </smpl>

Signed-off-by: Jan Engelhardt <jengelh@medozas.de>
  • Loading branch information
Jan Engelhardt committed Mar 25, 2010
1 parent 5d877d8 commit 7911b5c
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions net/netfilter/ipvs/ip_vs_xmit.c
Original file line number Diff line number Diff line change
Expand Up @@ -269,7 +269,7 @@ ip_vs_bypass_xmit(struct sk_buff *skb, struct ip_vs_conn *cp,
/* Another hack: avoid icmp_send in ip_fragment */
skb->local_df = 1;

IP_VS_XMIT(PF_INET, skb, rt);
IP_VS_XMIT(NFPROTO_IPV4, skb, rt);

LeaveFunction(10);
return NF_STOLEN;
Expand Down Expand Up @@ -333,7 +333,7 @@ ip_vs_bypass_xmit_v6(struct sk_buff *skb, struct ip_vs_conn *cp,
/* Another hack: avoid icmp_send in ip_fragment */
skb->local_df = 1;

IP_VS_XMIT(PF_INET6, skb, rt);
IP_VS_XMIT(NFPROTO_IPV6, skb, rt);

LeaveFunction(10);
return NF_STOLEN;
Expand Down Expand Up @@ -409,7 +409,7 @@ ip_vs_nat_xmit(struct sk_buff *skb, struct ip_vs_conn *cp,
/* Another hack: avoid icmp_send in ip_fragment */
skb->local_df = 1;

IP_VS_XMIT(PF_INET, skb, rt);
IP_VS_XMIT(NFPROTO_IPV4, skb, rt);

LeaveFunction(10);
return NF_STOLEN;
Expand Down Expand Up @@ -485,7 +485,7 @@ ip_vs_nat_xmit_v6(struct sk_buff *skb, struct ip_vs_conn *cp,
/* Another hack: avoid icmp_send in ip_fragment */
skb->local_df = 1;

IP_VS_XMIT(PF_INET6, skb, rt);
IP_VS_XMIT(NFPROTO_IPV6, skb, rt);

LeaveFunction(10);
return NF_STOLEN;
Expand Down Expand Up @@ -784,7 +784,7 @@ ip_vs_dr_xmit(struct sk_buff *skb, struct ip_vs_conn *cp,
/* Another hack: avoid icmp_send in ip_fragment */
skb->local_df = 1;

IP_VS_XMIT(PF_INET, skb, rt);
IP_VS_XMIT(NFPROTO_IPV4, skb, rt);

LeaveFunction(10);
return NF_STOLEN;
Expand Down Expand Up @@ -837,7 +837,7 @@ ip_vs_dr_xmit_v6(struct sk_buff *skb, struct ip_vs_conn *cp,
/* Another hack: avoid icmp_send in ip_fragment */
skb->local_df = 1;

IP_VS_XMIT(PF_INET6, skb, rt);
IP_VS_XMIT(NFPROTO_IPV6, skb, rt);

LeaveFunction(10);
return NF_STOLEN;
Expand Down Expand Up @@ -911,7 +911,7 @@ ip_vs_icmp_xmit(struct sk_buff *skb, struct ip_vs_conn *cp,
/* Another hack: avoid icmp_send in ip_fragment */
skb->local_df = 1;

IP_VS_XMIT(PF_INET, skb, rt);
IP_VS_XMIT(NFPROTO_IPV4, skb, rt);

rc = NF_STOLEN;
goto out;
Expand Down Expand Up @@ -986,7 +986,7 @@ ip_vs_icmp_xmit_v6(struct sk_buff *skb, struct ip_vs_conn *cp,
/* Another hack: avoid icmp_send in ip_fragment */
skb->local_df = 1;

IP_VS_XMIT(PF_INET6, skb, rt);
IP_VS_XMIT(NFPROTO_IPV6, skb, rt);

rc = NF_STOLEN;
goto out;
Expand Down

0 comments on commit 7911b5c

Please sign in to comment.