]> www.pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - net/netfilter/nf_conntrack_netlink.c
[NETFILTER]: Kill some supper dupper bloatry
[linux-2.6-omap-h63xx.git] / net / netfilter / nf_conntrack_netlink.c
index 75012585efe0442dfb176a8efe021879bc0083ca..38141f104db7cfda21817140dce88f1d02bb0747 100644 (file)
@@ -95,7 +95,7 @@ nla_put_failure:
        return -1;
 }
 
-static inline int
+static int
 ctnetlink_dump_tuples(struct sk_buff *skb,
                      const struct nf_conntrack_tuple *tuple)
 {
@@ -205,7 +205,7 @@ nla_put_failure:
 }
 
 #ifdef CONFIG_NF_CT_ACCT
-static inline int
+static int
 ctnetlink_dump_counters(struct sk_buff *skb, const struct nf_conn *ct,
                        enum ip_conntrack_dir dir)
 {
@@ -284,7 +284,7 @@ nla_put_failure:
 }
 
 #ifdef CONFIG_NF_NAT_NEEDED
-static inline int
+static int
 dump_nat_seq_adj(struct sk_buff *skb, const struct nf_nat_seq *natseq, int type)
 {
        struct nlattr *nest_parms;
@@ -534,7 +534,7 @@ static int ctnetlink_done(struct netlink_callback *cb)
        return 0;
 }
 
-#define L3PROTO(ct) ct->tuplehash[IP_CT_DIR_ORIGINAL].tuple.src.l3num
+#define L3PROTO(ct) (ct)->tuplehash[IP_CT_DIR_ORIGINAL].tuple.src.l3num
 
 static int
 ctnetlink_dump_table(struct sk_buff *skb, struct netlink_callback *cb)
@@ -648,7 +648,7 @@ ctnetlink_parse_tuple_proto(struct nlattr *attr,
        return ret;
 }
 
-static inline int
+static int
 ctnetlink_parse_tuple(struct nlattr *cda[], struct nf_conntrack_tuple *tuple,
                      enum ctattr_tuple type, u_int8_t l3num)
 {
@@ -695,7 +695,7 @@ static int nfnetlink_parse_nat_proto(struct nlattr *attr,
                                     struct nf_nat_range *range)
 {
        struct nlattr *tb[CTA_PROTONAT_MAX+1];
-       struct nf_nat_protocol *npt;
+       const struct nf_nat_protocol *npt;
        int err;
 
        err = nla_parse_nested(tb, CTA_PROTONAT_MAX, attr, protonat_nla_policy);
@@ -888,7 +888,7 @@ out:
        return err;
 }
 
-static inline int
+static int
 ctnetlink_change_status(struct nf_conn *ct, struct nlattr *cda[])
 {
        unsigned long d;
@@ -918,19 +918,17 @@ ctnetlink_change_status(struct nf_conn *ct, struct nlattr *cda[])
                        if (nfnetlink_parse_nat(cda[CTA_NAT_DST], ct,
                                                &range) < 0)
                                return -EINVAL;
-                       if (nf_nat_initialized(ct,
-                                              HOOK2MANIP(NF_INET_PRE_ROUTING)))
+                       if (nf_nat_initialized(ct, IP_NAT_MANIP_DST))
                                return -EEXIST;
-                       nf_nat_setup_info(ct, &range, NF_INET_PRE_ROUTING);
+                       nf_nat_setup_info(ct, &range, IP_NAT_MANIP_DST);
                }
                if (cda[CTA_NAT_SRC]) {
                        if (nfnetlink_parse_nat(cda[CTA_NAT_SRC], ct,
                                                &range) < 0)
                                return -EINVAL;
-                       if (nf_nat_initialized(ct,
-                                              HOOK2MANIP(NF_INET_POST_ROUTING)))
+                       if (nf_nat_initialized(ct, IP_NAT_MANIP_SRC))
                                return -EEXIST;
-                       nf_nat_setup_info(ct, &range, NF_INET_POST_ROUTING);
+                       nf_nat_setup_info(ct, &range, IP_NAT_MANIP_SRC);
                }
 #endif
        }
@@ -1351,7 +1349,7 @@ nla_put_failure:
        return -1;
 }
 
-static inline int
+static int
 ctnetlink_exp_dump_expect(struct sk_buff *skb,
                          const struct nf_conntrack_expect *exp)
 {