]> err.no Git - linux-2.6/blobdiff - net/ipv6/raw.c
inet{6}_request_sock: Init ->opt and ->pktopts in the constructor
[linux-2.6] / net / ipv6 / raw.c
index 603df76e052267f5882952e59e51296912143653..8fee9a15b2d346cb5035c782654eeef4dcd88db2 100644 (file)
@@ -1164,6 +1164,14 @@ static void rawv6_close(struct sock *sk, long timeout)
        sk_common_release(sk);
 }
 
+static int raw6_destroy(struct sock *sk)
+{
+       lock_sock(sk);
+       ip6_flush_pending_frames(sk);
+       release_sock(sk);
+       return 0;
+}
+
 static int rawv6_init_sk(struct sock *sk)
 {
        struct raw6_sock *rp = raw6_sk(sk);
@@ -1187,6 +1195,7 @@ struct proto rawv6_prot = {
        .name              = "RAWv6",
        .owner             = THIS_MODULE,
        .close             = rawv6_close,
+       .destroy           = raw6_destroy,
        .connect           = ip6_datagram_connect,
        .disconnect        = udp_disconnect,
        .ioctl             = rawv6_ioctl,