netfilter: ipvs: Remove useless ipvsh param of frag_safe_skb_hp
authorGao Feng <gfree.wind@vip.163.com>
Mon, 13 Nov 2017 14:58:18 +0000 (22:58 +0800)
committerPablo Neira Ayuso <pablo@netfilter.org>
Mon, 8 Jan 2018 17:01:02 +0000 (18:01 +0100)
The param of frag_safe_skb_hp, ipvsh, isn't used now. So remove it and
update the callers' codes too.

Signed-off-by: Gao Feng <gfree.wind@vip.163.com>
Acked-by: Simon Horman <horms+renesas@verge.net.au>
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
include/net/ip_vs.h
net/netfilter/ipvs/ip_vs_conn.c
net/netfilter/ipvs/ip_vs_core.c

index ff68cf288f9bf3a3ac18d696e215980e4fee54f5..eb0bec043c9618b6f44a5bcb3d2138056672c851 100644 (file)
@@ -69,8 +69,7 @@ struct ip_vs_iphdr {
 };
 
 static inline void *frag_safe_skb_hp(const struct sk_buff *skb, int offset,
-                                     int len, void *buffer,
-                                     const struct ip_vs_iphdr *ipvsh)
+                                     int len, void *buffer)
 {
        return skb_header_pointer(skb, offset, len, buffer);
 }
index 3e053cb300709cfb09b93364b33da69c5f9dff2a..f489b8db2406c991815f5ff5100a81382b55a803 100644 (file)
@@ -322,7 +322,7 @@ ip_vs_conn_fill_param_proto(struct netns_ipvs *ipvs,
 {
        __be16 _ports[2], *pptr;
 
-       pptr = frag_safe_skb_hp(skb, iph->len, sizeof(_ports), _ports, iph);
+       pptr = frag_safe_skb_hp(skb, iph->len, sizeof(_ports), _ports);
        if (pptr == NULL)
                return 1;
 
index 5cb7cac9177d8bb2b2a37e887aed7a8b7378980c..5f6f73cf2174d1494a685d73ca94ea124da83de5 100644 (file)
@@ -433,7 +433,7 @@ ip_vs_schedule(struct ip_vs_service *svc, struct sk_buff *skb,
        /*
         * IPv6 frags, only the first hit here.
         */
-       pptr = frag_safe_skb_hp(skb, iph->len, sizeof(_ports), _ports, iph);
+       pptr = frag_safe_skb_hp(skb, iph->len, sizeof(_ports), _ports);
        if (pptr == NULL)
                return NULL;
 
@@ -566,7 +566,7 @@ int ip_vs_leave(struct ip_vs_service *svc, struct sk_buff *skb,
        struct netns_ipvs *ipvs = svc->ipvs;
        struct net *net = ipvs->net;
 
-       pptr = frag_safe_skb_hp(skb, iph->len, sizeof(_ports), _ports, iph);
+       pptr = frag_safe_skb_hp(skb, iph->len, sizeof(_ports), _ports);
        if (!pptr)
                return NF_DROP;
        dport = likely(!ip_vs_iph_inverse(iph)) ? pptr[1] : pptr[0];
@@ -982,7 +982,7 @@ static int ip_vs_out_icmp_v6(struct netns_ipvs *ipvs, struct sk_buff *skb,
        unsigned int offset;
 
        *related = 1;
-       ic = frag_safe_skb_hp(skb, ipvsh->len, sizeof(_icmph), &_icmph, ipvsh);
+       ic = frag_safe_skb_hp(skb, ipvsh->len, sizeof(_icmph), &_icmph);
        if (ic == NULL)
                return NF_DROP;
 
@@ -1214,7 +1214,7 @@ static struct ip_vs_conn *__ip_vs_rs_conn_out(unsigned int hooknum,
                return NULL;
 
        pptr = frag_safe_skb_hp(skb, iph->len,
-                               sizeof(_ports), _ports, iph);
+                               sizeof(_ports), _ports);
        if (!pptr)
                return NULL;
 
@@ -1407,7 +1407,7 @@ ip_vs_out(struct netns_ipvs *ipvs, unsigned int hooknum, struct sk_buff *skb, in
                __be16 _ports[2], *pptr;
 
                pptr = frag_safe_skb_hp(skb, iph.len,
-                                        sizeof(_ports), _ports, &iph);
+                                        sizeof(_ports), _ports);
                if (pptr == NULL)
                        return NF_ACCEPT;       /* Not for me */
                if (ip_vs_has_real_service(ipvs, af, iph.protocol, &iph.saddr,
@@ -1741,7 +1741,7 @@ static int ip_vs_in_icmp_v6(struct netns_ipvs *ipvs, struct sk_buff *skb,
 
        *related = 1;
 
-       ic = frag_safe_skb_hp(skb, iph->len, sizeof(_icmph), &_icmph, iph);
+       ic = frag_safe_skb_hp(skb, iph->len, sizeof(_icmph), &_icmph);
        if (ic == NULL)
                return NF_DROP;