Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 97685
b: refs/heads/master
c: 22dd485
h: refs/heads/master
i:
  97683: 135a3f5
v: v3
  • Loading branch information
Denis V. Lunev authored and David S. Miller committed Jun 4, 2008
1 parent d871094 commit e3681e3
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 1 deletion.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 199f7d24ae59894243687a234a909f44a8724506
refs/heads/master: 22dd485022f3d0b162ceb5e67d85de7c3806aa20
9 changes: 9 additions & 0 deletions trunk/net/ipv4/raw.c
Original file line number Diff line number Diff line change
Expand Up @@ -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)
{
Expand Down Expand Up @@ -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,
Expand Down
9 changes: 9 additions & 0 deletions trunk/net/ipv6/raw.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand All @@ -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,
Expand Down

0 comments on commit e3681e3

Please sign in to comment.