[PPPOL2TP]: Reset meta-data in xmit function
authorPatrick McHardy <kaber@trash.net>
Wed, 18 Jul 2007 09:04:39 +0000 (02:04 -0700)
committerDavid S. Miller <davem@davemloft.net>
Wed, 18 Jul 2007 09:04:39 +0000 (02:04 -0700)
Reset netfilter data and IP CB, fix dst_entry leak.

Signed-off-by: Patrick McHardy <kaber@trash.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/pppol2tp.c

index 856610f0624eb41641be7a882bd07d07f5cfe0f1..f87176055d0ee6430ddc1fff6b09dea781ebd5b2 100644 (file)
@@ -1049,7 +1049,13 @@ static int pppol2tp_xmit(struct ppp_channel *chan, struct sk_buff *skb)
                printk("\n");
        }
 
+       memset(&(IPCB(skb2)->opt), 0, sizeof(IPCB(skb2)->opt));
+       IPCB(skb2)->flags &= ~(IPSKB_XFRM_TUNNEL_SIZE | IPSKB_XFRM_TRANSFORMED |
+                              IPSKB_REROUTED);
+       nf_reset(skb2);
+
        /* Get routing info from the tunnel socket */
+       dst_release(skb2->dst);
        skb2->dst = sk_dst_get(sk_tun);
 
        /* Queue the packet to IP for output */