Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

netfilter: nf_reject: remove unneeded exports

These functions have no external callers and can be static.

Signed-off-by: Florian Westphal <fw@strlen.de>

+42 -40
-8
include/net/netfilter/ipv4/nf_reject.h
··· 10 10 void nf_send_unreach(struct sk_buff *skb_in, int code, int hook); 11 11 void nf_send_reset(struct net *net, struct sock *, struct sk_buff *oldskb, 12 12 int hook); 13 - const struct tcphdr *nf_reject_ip_tcphdr_get(struct sk_buff *oldskb, 14 - struct tcphdr *_oth, int hook); 15 - struct iphdr *nf_reject_iphdr_put(struct sk_buff *nskb, 16 - const struct sk_buff *oldskb, 17 - __u8 protocol, int ttl); 18 - void nf_reject_ip_tcphdr_put(struct sk_buff *nskb, const struct sk_buff *oldskb, 19 - const struct tcphdr *oth); 20 - 21 13 struct sk_buff *nf_reject_skb_v4_unreach(struct net *net, 22 14 struct sk_buff *oldskb, 23 15 const struct net_device *dev,
-10
include/net/netfilter/ipv6/nf_reject.h
··· 9 9 unsigned int hooknum); 10 10 void nf_send_reset6(struct net *net, struct sock *sk, struct sk_buff *oldskb, 11 11 int hook); 12 - const struct tcphdr *nf_reject_ip6_tcphdr_get(struct sk_buff *oldskb, 13 - struct tcphdr *otcph, 14 - unsigned int *otcplen, int hook); 15 - struct ipv6hdr *nf_reject_ip6hdr_put(struct sk_buff *nskb, 16 - const struct sk_buff *oldskb, 17 - __u8 protocol, int hoplimit); 18 - void nf_reject_ip6_tcphdr_put(struct sk_buff *nskb, 19 - const struct sk_buff *oldskb, 20 - const struct tcphdr *oth, unsigned int otcplen); 21 - 22 12 struct sk_buff *nf_reject_skb_v6_tcp_reset(struct net *net, 23 13 struct sk_buff *oldskb, 24 14 const struct net_device *dev,
+17 -10
net/ipv4/netfilter/nf_reject_ipv4.c
··· 12 12 #include <linux/netfilter_ipv4.h> 13 13 #include <linux/netfilter_bridge.h> 14 14 15 + static struct iphdr *nf_reject_iphdr_put(struct sk_buff *nskb, 16 + const struct sk_buff *oldskb, 17 + __u8 protocol, int ttl); 18 + static void nf_reject_ip_tcphdr_put(struct sk_buff *nskb, const struct sk_buff *oldskb, 19 + const struct tcphdr *oth); 20 + static const struct tcphdr * 21 + nf_reject_ip_tcphdr_get(struct sk_buff *oldskb, 22 + struct tcphdr *_oth, int hook); 23 + 15 24 static int nf_reject_iphdr_validate(struct sk_buff *skb) 16 25 { 17 26 struct iphdr *iph; ··· 145 136 } 146 137 EXPORT_SYMBOL_GPL(nf_reject_skb_v4_unreach); 147 138 148 - const struct tcphdr *nf_reject_ip_tcphdr_get(struct sk_buff *oldskb, 149 - struct tcphdr *_oth, int hook) 139 + static const struct tcphdr * 140 + nf_reject_ip_tcphdr_get(struct sk_buff *oldskb, 141 + struct tcphdr *_oth, int hook) 150 142 { 151 143 const struct tcphdr *oth; 152 144 ··· 173 163 174 164 return oth; 175 165 } 176 - EXPORT_SYMBOL_GPL(nf_reject_ip_tcphdr_get); 177 166 178 - struct iphdr *nf_reject_iphdr_put(struct sk_buff *nskb, 179 - const struct sk_buff *oldskb, 180 - __u8 protocol, int ttl) 167 + static struct iphdr *nf_reject_iphdr_put(struct sk_buff *nskb, 168 + const struct sk_buff *oldskb, 169 + __u8 protocol, int ttl) 181 170 { 182 171 struct iphdr *niph, *oiph = ip_hdr(oldskb); 183 172 ··· 197 188 198 189 return niph; 199 190 } 200 - EXPORT_SYMBOL_GPL(nf_reject_iphdr_put); 201 191 202 - void nf_reject_ip_tcphdr_put(struct sk_buff *nskb, const struct sk_buff *oldskb, 203 - const struct tcphdr *oth) 192 + static void nf_reject_ip_tcphdr_put(struct sk_buff *nskb, const struct sk_buff *oldskb, 193 + const struct tcphdr *oth) 204 194 { 205 195 struct iphdr *niph = ip_hdr(nskb); 206 196 struct tcphdr *tcph; ··· 226 218 nskb->csum_start = (unsigned char *)tcph - nskb->head; 227 219 nskb->csum_offset = offsetof(struct tcphdr, check); 228 220 } 229 - EXPORT_SYMBOL_GPL(nf_reject_ip_tcphdr_put); 230 221 231 222 static int nf_reject_fill_skb_dst(struct sk_buff *skb_in) 232 223 {
+25 -12
net/ipv6/netfilter/nf_reject_ipv6.c
··· 12 12 #include <linux/netfilter_ipv6.h> 13 13 #include <linux/netfilter_bridge.h> 14 14 15 + static struct ipv6hdr * 16 + nf_reject_ip6hdr_put(struct sk_buff *nskb, 17 + const struct sk_buff *oldskb, 18 + __u8 protocol, int hoplimit); 19 + static void 20 + nf_reject_ip6_tcphdr_put(struct sk_buff *nskb, 21 + const struct sk_buff *oldskb, 22 + const struct tcphdr *oth, unsigned int otcplen); 23 + static const struct tcphdr * 24 + nf_reject_ip6_tcphdr_get(struct sk_buff *oldskb, 25 + struct tcphdr *otcph, 26 + unsigned int *otcplen, int hook); 27 + 15 28 static bool nf_reject_v6_csum_ok(struct sk_buff *skb, int hook) 16 29 { 17 30 const struct ipv6hdr *ip6h = ipv6_hdr(skb); ··· 159 146 } 160 147 EXPORT_SYMBOL_GPL(nf_reject_skb_v6_unreach); 161 148 162 - const struct tcphdr *nf_reject_ip6_tcphdr_get(struct sk_buff *oldskb, 163 - struct tcphdr *otcph, 164 - unsigned int *otcplen, int hook) 149 + static const struct tcphdr * 150 + nf_reject_ip6_tcphdr_get(struct sk_buff *oldskb, 151 + struct tcphdr *otcph, 152 + unsigned int *otcplen, int hook) 165 153 { 166 154 const struct ipv6hdr *oip6h = ipv6_hdr(oldskb); 167 155 u8 proto; ··· 206 192 207 193 return otcph; 208 194 } 209 - EXPORT_SYMBOL_GPL(nf_reject_ip6_tcphdr_get); 210 195 211 - struct ipv6hdr *nf_reject_ip6hdr_put(struct sk_buff *nskb, 212 - const struct sk_buff *oldskb, 213 - __u8 protocol, int hoplimit) 196 + static struct ipv6hdr * 197 + nf_reject_ip6hdr_put(struct sk_buff *nskb, 198 + const struct sk_buff *oldskb, 199 + __u8 protocol, int hoplimit) 214 200 { 215 201 struct ipv6hdr *ip6h; 216 202 const struct ipv6hdr *oip6h = ipv6_hdr(oldskb); ··· 230 216 231 217 return ip6h; 232 218 } 233 - EXPORT_SYMBOL_GPL(nf_reject_ip6hdr_put); 234 219 235 - void nf_reject_ip6_tcphdr_put(struct sk_buff *nskb, 236 - const struct sk_buff *oldskb, 237 - const struct tcphdr *oth, unsigned int otcplen) 220 + static void 221 + nf_reject_ip6_tcphdr_put(struct sk_buff *nskb, 222 + const struct sk_buff *oldskb, 223 + const struct tcphdr *oth, unsigned int otcplen) 238 224 { 239 225 struct tcphdr *tcph; 240 226 ··· 262 248 csum_partial(tcph, 263 249 sizeof(struct tcphdr), 0)); 264 250 } 265 - EXPORT_SYMBOL_GPL(nf_reject_ip6_tcphdr_put); 266 251 267 252 static int nf_reject6_fill_skb_dst(struct sk_buff *skb_in) 268 253 {