]> err.no Git - linux-2.6/blobdiff - net/ipv4/raw.c
Merge branch 'core/iter-div' of git://git.kernel.org/pub/scm/linux/kernel/git/tip...
[linux-2.6] / net / ipv4 / raw.c
index fead049daf4399b94d6e8322ac7aa1e25b17999f..e7e091d365fffb1630782dba6ca659921cb0a411 100644 (file)
@@ -608,6 +608,14 @@ static void raw_close(struct sock *sk, long timeout)
        sk_common_release(sk);
 }
 
+static int raw_destroy(struct sock *sk)
+{
+       lock_sock(sk);
+       ip_flush_pending_frames(sk);
+       release_sock(sk);
+       return 0;
+}
+
 /* This gets rid of all the nasties in af_inet. -DaveM */
 static int raw_bind(struct sock *sk, struct sockaddr *uaddr, int addr_len)
 {
@@ -820,6 +828,7 @@ struct proto raw_prot = {
        .name              = "RAW",
        .owner             = THIS_MODULE,
        .close             = raw_close,
+       .destroy           = raw_destroy,
        .connect           = ip4_datagram_connect,
        .disconnect        = udp_disconnect,
        .ioctl             = raw_ioctl,