]> git.proxmox.com Git - mirror_ubuntu-artful-kernel.git/blobdiff - net/ipv4/netfilter/ipt_SYNPROXY.c
networking: make skb_put & friends return void pointers
[mirror_ubuntu-artful-kernel.git] / net / ipv4 / netfilter / ipt_SYNPROXY.c
index af2b69b6895f5ae8e326b27e05efa01cc1405e1b..f1528f7175a8c18697cb4b5da776acc670076e49 100644 (file)
@@ -24,7 +24,7 @@ synproxy_build_ip(struct net *net, struct sk_buff *skb, __be32 saddr,
        struct iphdr *iph;
 
        skb_reset_network_header(skb);
-       iph = (struct iphdr *)skb_put(skb, sizeof(*iph));
+       iph = skb_put(skb, sizeof(*iph));
        iph->version    = 4;
        iph->ihl        = sizeof(*iph) / 4;
        iph->tos        = 0;
@@ -91,7 +91,7 @@ synproxy_send_client_synack(struct net *net,
        niph = synproxy_build_ip(net, nskb, iph->daddr, iph->saddr);
 
        skb_reset_transport_header(nskb);
-       nth = (struct tcphdr *)skb_put(nskb, tcp_hdr_size);
+       nth = skb_put(nskb, tcp_hdr_size);
        nth->source     = th->dest;
        nth->dest       = th->source;
        nth->seq        = htonl(__cookie_v4_init_sequence(iph, th, &mss));
@@ -133,7 +133,7 @@ synproxy_send_server_syn(struct net *net,
        niph = synproxy_build_ip(net, nskb, iph->saddr, iph->daddr);
 
        skb_reset_transport_header(nskb);
-       nth = (struct tcphdr *)skb_put(nskb, tcp_hdr_size);
+       nth = skb_put(nskb, tcp_hdr_size);
        nth->source     = th->source;
        nth->dest       = th->dest;
        nth->seq        = htonl(recv_seq - 1);
@@ -178,7 +178,7 @@ synproxy_send_server_ack(struct net *net,
        niph = synproxy_build_ip(net, nskb, iph->daddr, iph->saddr);
 
        skb_reset_transport_header(nskb);
-       nth = (struct tcphdr *)skb_put(nskb, tcp_hdr_size);
+       nth = skb_put(nskb, tcp_hdr_size);
        nth->source     = th->dest;
        nth->dest       = th->source;
        nth->seq        = htonl(ntohl(th->ack_seq));
@@ -216,7 +216,7 @@ synproxy_send_client_ack(struct net *net,
        niph = synproxy_build_ip(net, nskb, iph->saddr, iph->daddr);
 
        skb_reset_transport_header(nskb);
-       nth = (struct tcphdr *)skb_put(nskb, tcp_hdr_size);
+       nth = skb_put(nskb, tcp_hdr_size);
        nth->source     = th->source;
        nth->dest       = th->dest;
        nth->seq        = htonl(ntohl(th->seq) + 1);