diff options
author | Ralf Baechle <ralf@linux-mips.org> | 1998-03-17 22:05:47 +0000 |
---|---|---|
committer | Ralf Baechle <ralf@linux-mips.org> | 1998-03-17 22:05:47 +0000 |
commit | 27cfca1ec98e91261b1a5355d10a8996464b63af (patch) | |
tree | 8e895a53e372fa682b4c0a585b9377d67ed70d0e /net/ipv4/ip_sockglue.c | |
parent | 6a76fb7214c477ccf6582bd79c5b4ccc4f9c41b1 (diff) |
Look Ma' what I found on my harddisk ...
o New faster syscalls for 2.1.x, too
o Upgrade to 2.1.89.
Don't try to run this. It's flaky as hell. But feel free to debug ...
Diffstat (limited to 'net/ipv4/ip_sockglue.c')
-rw-r--r-- | net/ipv4/ip_sockglue.c | 13 |
1 files changed, 4 insertions, 9 deletions
diff --git a/net/ipv4/ip_sockglue.c b/net/ipv4/ip_sockglue.c index 2fd2b16ab..a500a72e5 100644 --- a/net/ipv4/ip_sockglue.c +++ b/net/ipv4/ip_sockglue.c @@ -5,7 +5,7 @@ * * The IP to API glue. * - * Version: $Id: ip_sockglue.c,v 1.3 1997/12/16 05:37:41 ralf Exp $ + * Version: $Id: ip_sockglue.c,v 1.4 1998/03/03 01:23:41 ralf Exp $ * * Authors: see ip.c * @@ -14,6 +14,7 @@ * Martin Mares : TOS setting fixed. * Alan Cox : Fixed a couple of oopses in Martin's * TOS tweaks. + * Mike McLagan : Routing by source */ #include <linux/config.h> @@ -32,7 +33,6 @@ #include <linux/igmp.h> #include <linux/firewall.h> #include <linux/ip_fw.h> -#include <net/checksum.h> #include <linux/route.h> #include <linux/mroute.h> #include <net/route.h> @@ -314,14 +314,9 @@ int ip_setsockopt(struct sock *sk, int level, int optname, char *optval, int opt if (IPTOS_PREC(val) >= IPTOS_PREC_CRITIC_ECP && !suser()) return -EPERM; if (sk->ip_tos != val) { - start_bh_atomic(); sk->ip_tos=val; sk->priority = rt_tos2priority(val); - if (sk->dst_cache) { - dst_release(sk->dst_cache); - sk->dst_cache = NULL; - } - end_bh_atomic(); + dst_release(xchg(&sk->dst_cache, NULL)); } sk->priority = rt_tos2priority(val); return 0; @@ -352,7 +347,7 @@ int ip_setsockopt(struct sock *sk, int level, int optname, char *optval, int opt struct sk_buff *skb; /* Drain queued errors */ while((skb=skb_dequeue(&sk->error_queue))!=NULL) - kfree_skb(skb, FREE_READ); + kfree_skb(skb); } sk->ip_recverr = val?1:0; release_sock(sk); |