summaryrefslogtreecommitdiffstats
path: root/net/bridge
diff options
context:
space:
mode:
authoryuan linyu <Linyu.Yuan@alcatel-sbell.com.cn>2017-06-18 22:52:04 +0800
committerDavid S. Miller <davem@davemloft.net>2017-06-20 13:30:15 -0400
commitb952f4dff2751252db073c27c0f8a16a416a2ddc (patch)
treefda132505741ee4d859ae09f45966656ea557572 /net/bridge
parentad941e693b24ad8b13c28382d323552ef6fb434b (diff)
downloadlinux-b952f4dff2751252db073c27c0f8a16a416a2ddc.tar.bz2
net: manual clean code which call skb_put_[data:zero]
Signed-off-by: yuan linyu <Linyu.Yuan@alcatel-sbell.com.cn> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/bridge')
-rw-r--r--net/bridge/netfilter/nft_reject_bridge.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/net/bridge/netfilter/nft_reject_bridge.c b/net/bridge/netfilter/nft_reject_bridge.c
index a05775afa44b..eaf05de37f75 100644
--- a/net/bridge/netfilter/nft_reject_bridge.c
+++ b/net/bridge/netfilter/nft_reject_bridge.c
@@ -107,7 +107,6 @@ static void nft_reject_br_send_v4_unreach(struct net *net,
struct iphdr *niph;
struct icmphdr *icmph;
unsigned int len;
- void *payload;
__wsum csum;
u8 proto;
@@ -151,7 +150,7 @@ static void nft_reject_br_send_v4_unreach(struct net *net,
icmph->type = ICMP_DEST_UNREACH;
icmph->code = code;
- payload = skb_put_data(nskb, skb_network_header(oldskb), len);
+ skb_put_data(nskb, skb_network_header(oldskb), len);
csum = csum_partial((void *)icmph, len + sizeof(struct icmphdr), 0);
icmph->checksum = csum_fold(csum);
@@ -247,7 +246,6 @@ static void nft_reject_br_send_v6_unreach(struct net *net,
struct ipv6hdr *nip6h;
struct icmp6hdr *icmp6h;
unsigned int len;
- void *payload;
if (!nft_bridge_ip6hdr_validate(oldskb))
return;
@@ -277,7 +275,7 @@ static void nft_reject_br_send_v6_unreach(struct net *net,
icmp6h->icmp6_type = ICMPV6_DEST_UNREACH;
icmp6h->icmp6_code = code;
- payload = skb_put_data(nskb, skb_network_header(oldskb), len);
+ skb_put_data(nskb, skb_network_header(oldskb), len);
nip6h->payload_len = htons(nskb->len - sizeof(struct ipv6hdr));
icmp6h->icmp6_cksum =