]> git.karo-electronics.de Git - mv-sheeva.git/blobdiff - net/ipv4/netfilter.c
[NETFILTER]: kill nf_sysctl.c
[mv-sheeva.git] / net / ipv4 / netfilter.c
index f7166084a5ab76cefcc71894a1d9d880086fd746..63221553d26b785f97d85ce0778cf82007643478 100644 (file)
@@ -19,7 +19,7 @@ int ip_route_me_harder(struct sk_buff *skb, unsigned addr_type)
        unsigned int hh_len;
        unsigned int type;
 
-       type = inet_addr_type(iph->saddr);
+       type = inet_addr_type(&init_net, iph->saddr);
        if (addr_type == RTN_UNSPEC)
                addr_type = type;
 
@@ -123,11 +123,12 @@ struct ip_rt_info {
        u_int8_t tos;
 };
 
-static void nf_ip_saveroute(const struct sk_buff *skb, struct nf_info *info)
+static void nf_ip_saveroute(const struct sk_buff *skb,
+                           struct nf_queue_entry *entry)
 {
-       struct ip_rt_info *rt_info = nf_info_reroute(info);
+       struct ip_rt_info *rt_info = nf_queue_entry_reroute(entry);
 
-       if (info->hook == NF_INET_LOCAL_OUT) {
+       if (entry->hook == NF_INET_LOCAL_OUT) {
                const struct iphdr *iph = ip_hdr(skb);
 
                rt_info->tos = iph->tos;
@@ -136,11 +137,12 @@ static void nf_ip_saveroute(const struct sk_buff *skb, struct nf_info *info)
        }
 }
 
-static int nf_ip_reroute(struct sk_buff *skb, const struct nf_info *info)
+static int nf_ip_reroute(struct sk_buff *skb,
+                        const struct nf_queue_entry *entry)
 {
-       const struct ip_rt_info *rt_info = nf_info_reroute(info);
+       const struct ip_rt_info *rt_info = nf_queue_entry_reroute(entry);
 
-       if (info->hook == NF_INET_LOCAL_OUT) {
+       if (entry->hook == NF_INET_LOCAL_OUT) {
                const struct iphdr *iph = ip_hdr(skb);
 
                if (!(iph->tos == rt_info->tos
@@ -188,7 +190,7 @@ static int nf_ip_route(struct dst_entry **dst, struct flowi *fl)
        return ip_route_output_key((struct rtable **)dst, fl);
 }
 
-static struct nf_afinfo nf_ip_afinfo = {
+static const struct nf_afinfo nf_ip_afinfo = {
        .family         = AF_INET,
        .checksum       = nf_ip_checksum,
        .route          = nf_ip_route,
@@ -209,3 +211,13 @@ static void ipv4_netfilter_fini(void)
 
 module_init(ipv4_netfilter_init);
 module_exit(ipv4_netfilter_fini);
+
+#ifdef CONFIG_SYSCTL
+struct ctl_path nf_net_ipv4_netfilter_sysctl_path[] = {
+       { .procname = "net", .ctl_name = CTL_NET, },
+       { .procname = "ipv4", .ctl_name = NET_IPV4, },
+       { .procname = "netfilter", .ctl_name = NET_IPV4_NETFILTER, },
+       { }
+};
+EXPORT_SYMBOL_GPL(nf_net_ipv4_netfilter_sysctl_path);
+#endif /* CONFIG_SYSCTL */