From: yuan linyu <linyu.y...@alcatel-sbell.com.cn>

Signed-off-by: yuan linyu <linyu.y...@alcatel-sbell.com.cn>
---
 net/ipv4/ipconfig.c                 | 3 +--
 net/ipv4/netfilter/nf_reject_ipv4.c | 3 +--
 2 files changed, 2 insertions(+), 4 deletions(-)

diff --git a/net/ipv4/ipconfig.c b/net/ipv4/ipconfig.c
index c3b12b1..a6292a6 100644
--- a/net/ipv4/ipconfig.c
+++ b/net/ipv4/ipconfig.c
@@ -813,8 +813,7 @@ static void __init ic_bootp_send_if(struct ic_device *d, 
unsigned long jiffies_d
        if (!skb)
                return;
        skb_reserve(skb, hlen);
-       b = (struct bootp_pkt *) skb_put(skb, sizeof(struct bootp_pkt));
-       memset(b, 0, sizeof(struct bootp_pkt));
+       b = (struct bootp_pkt *) skb_put_zero(skb, sizeof(struct bootp_pkt));
 
        /* Construct IP header */
        skb_reset_network_header(skb);
diff --git a/net/ipv4/netfilter/nf_reject_ipv4.c 
b/net/ipv4/netfilter/nf_reject_ipv4.c
index 6f8d9e5..2569ba9 100644
--- a/net/ipv4/netfilter/nf_reject_ipv4.c
+++ b/net/ipv4/netfilter/nf_reject_ipv4.c
@@ -76,8 +76,7 @@ void nf_reject_ip_tcphdr_put(struct sk_buff *nskb, const 
struct sk_buff *oldskb,
        struct tcphdr *tcph;
 
        skb_reset_transport_header(nskb);
-       tcph = (struct tcphdr *)skb_put(nskb, sizeof(struct tcphdr));
-       memset(tcph, 0, sizeof(*tcph));
+       tcph = (struct tcphdr *)skb_put_zero(nskb, sizeof(struct tcphdr));
        tcph->source    = oth->dest;
        tcph->dest      = oth->source;
        tcph->doff      = sizeof(struct tcphdr) / 4;
-- 
2.7.4


Reply via email to