diff -NurpP --minimal linux-2.6.16-rc2-vs2.1.0.10/net/ipv4/raw.c linux-2.6.16-rc2-vs2.1.0.10.1/net/ipv4/raw.c --- linux-2.6.16-rc2-vs2.1.0.10/net/ipv4/raw.c 2006-02-07 18:29:24 +0100 +++ linux-2.6.16-rc2-vs2.1.0.10.1/net/ipv4/raw.c 2006-02-09 08:13:50 +0100 @@ -334,10 +334,11 @@ static int raw_send_hdrinc(struct sock * iph->check = ip_fast_csum((unsigned char *)iph, iph->ihl); } + err = -EPERM; if (!vx_check(0, VX_ADMIN) && !capable(CAP_NET_RAW) && (!addr_in_nx_info(sk->sk_nx_info, iph->saddr))) - goto error; + goto error_free; err = NF_HOOK(PF_INET, NF_IP_LOCAL_OUT, skb, NULL, rt->u.dst.dev, dst_output); @@ -350,6 +351,7 @@ out: error_fault: err = -EFAULT; +error_free: kfree_skb(skb); error: IP_INC_STATS(IPSTATS_MIB_OUTDISCARDS);