[NETFILTER]: nf_conntrack: use bool type in struct nf_conntrack_l4proto
[deliverable/linux.git] / net / netfilter / nf_conntrack_proto_gre.c
index e10024a1b6662e971ac565639d10c1bd16a85793..7d37a2ea67b25c2dbe444c04ca439ea55085a891 100644 (file)
@@ -148,18 +148,17 @@ EXPORT_SYMBOL_GPL(nf_ct_gre_keymap_destroy);
 /* PUBLIC CONNTRACK PROTO HELPER FUNCTIONS */
 
 /* invert gre part of tuple */
-static int gre_invert_tuple(struct nf_conntrack_tuple *tuple,
-                           const struct nf_conntrack_tuple *orig)
+static bool gre_invert_tuple(struct nf_conntrack_tuple *tuple,
+                            const struct nf_conntrack_tuple *orig)
 {
        tuple->dst.u.gre.key = orig->src.u.gre.key;
        tuple->src.u.gre.key = orig->dst.u.gre.key;
-       return 1;
+       return true;
 }
 
 /* gre hdr info to tuple */
-static int gre_pkt_to_tuple(const struct sk_buff *skb,
-                          unsigned int dataoff,
-                          struct nf_conntrack_tuple *tuple)
+static bool gre_pkt_to_tuple(const struct sk_buff *skb, unsigned int dataoff,
+                            struct nf_conntrack_tuple *tuple)
 {
        const struct gre_hdr_pptp *pgrehdr;
        struct gre_hdr_pptp _pgrehdr;
@@ -173,24 +172,24 @@ static int gre_pkt_to_tuple(const struct sk_buff *skb,
                /* try to behave like "nf_conntrack_proto_generic" */
                tuple->src.u.all = 0;
                tuple->dst.u.all = 0;
-               return 1;
+               return true;
        }
 
        /* PPTP header is variable length, only need up to the call_id field */
        pgrehdr = skb_header_pointer(skb, dataoff, 8, &_pgrehdr);
        if (!pgrehdr)
-               return 1;
+               return true;
 
        if (ntohs(grehdr->protocol) != GRE_PROTOCOL_PPTP) {
                pr_debug("GRE_VERSION_PPTP but unknown proto\n");
-               return 0;
+               return false;
        }
 
        tuple->dst.u.gre.key = pgrehdr->call_id;
        srckey = gre_keymap_lookup(tuple);
        tuple->src.u.gre.key = srckey;
 
-       return 1;
+       return true;
 }
 
 /* print gre part of tuple */
@@ -235,8 +234,8 @@ static int gre_packet(struct nf_conn *ct,
 }
 
 /* Called when a new connection for this protocol found. */
-static int gre_new(struct nf_conn *ct, const struct sk_buff *skb,
-                  unsigned int dataoff)
+static bool gre_new(struct nf_conn *ct, const struct sk_buff *skb,
+                   unsigned int dataoff)
 {
        pr_debug(": ");
        NF_CT_DUMP_TUPLE(&ct->tuplehash[IP_CT_DIR_ORIGINAL].tuple);
@@ -246,7 +245,7 @@ static int gre_new(struct nf_conn *ct, const struct sk_buff *skb,
        ct->proto.gre.stream_timeout = GRE_STREAM_TIMEOUT;
        ct->proto.gre.timeout = GRE_TIMEOUT;
 
-       return 1;
+       return true;
 }
 
 /* Called when a conntrack entry has already been removed from the hashes
This page took 0.030496 seconds and 5 git commands to generate.