summaryrefslogtreecommitdiffstats
path: root/net
diff options
context:
space:
mode:
authorRalf Baechle <ralf@linux-mips.org>2000-06-21 01:44:39 +0000
committerRalf Baechle <ralf@linux-mips.org>2000-06-21 01:44:39 +0000
commit5205a16d8870cdd4cc524589de3e09ad176d129a (patch)
tree6deddf1269b9e6f13f2fa00529cd4674c3b2a3fa /net
parente8b2e78e4f14d329f2cdfb8ef7ed3582c71454e5 (diff)
Merge with Linux 2.4.0-ac22-riel.
Diffstat (limited to 'net')
-rw-r--r--net/bridge/br_stp.c9
-rw-r--r--net/ipv4/ipconfig.c2
-rw-r--r--net/ipv4/netfilter/ip_conntrack_core.c23
-rw-r--r--net/unix/af_unix.c2
4 files changed, 21 insertions, 15 deletions
diff --git a/net/bridge/br_stp.c b/net/bridge/br_stp.c
index ccc4be790..8625038e1 100644
--- a/net/bridge/br_stp.c
+++ b/net/bridge/br_stp.c
@@ -5,7 +5,7 @@
* Authors:
* Lennert Buytenhek <buytenh@gnu.org>
*
- * $Id: br_stp.c,v 1.3 2000/05/05 02:17:17 davem Exp $
+ * $Id: br_stp.c,v 1.4 2000/06/19 10:13:35 davem Exp $
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
@@ -292,18 +292,19 @@ static void br_topology_change_acknowledged(struct net_bridge *br)
/* called under bridge lock */
void br_topology_change_detection(struct net_bridge *br)
{
- printk(KERN_INFO "%s: topology change detected, ", br->dev.name);
+ printk(KERN_INFO "%s: topology change detected", br->dev.name);
if (br_is_root_bridge(br)) {
- printk("propagating\n");
+ printk(", propagating");
br->topology_change = 1;
br_timer_set(&br->topology_change_timer, jiffies);
} else if (!br->topology_change_detected) {
- printk("sending tcn bpdu\n");
+ printk(", sending tcn bpdu");
br_transmit_tcn(br);
br_timer_set(&br->tcn_timer, jiffies);
}
+ printk("\n");
br->topology_change_detected = 1;
}
diff --git a/net/ipv4/ipconfig.c b/net/ipv4/ipconfig.c
index c5041fe7a..cf82c1623 100644
--- a/net/ipv4/ipconfig.c
+++ b/net/ipv4/ipconfig.c
@@ -1,5 +1,5 @@
/*
- * $Id: ipconfig.c,v 1.31 2000/05/03 06:37:06 davem Exp $
+ * $Id: ipconfig.c,v 1.32 2000/06/19 06:24:59 davem Exp $
*
* Automatic Configuration of IP -- use BOOTP or RARP or user-supplied
* information to configure own IP address and routes.
diff --git a/net/ipv4/netfilter/ip_conntrack_core.c b/net/ipv4/netfilter/ip_conntrack_core.c
index 35d4a01a9..780afc05b 100644
--- a/net/ipv4/netfilter/ip_conntrack_core.c
+++ b/net/ipv4/netfilter/ip_conntrack_core.c
@@ -262,7 +262,7 @@ ip_conntrack_confirm(struct ip_conntrack *ct)
/* Race check */
if (!(ct->status & IPS_CONFIRMED)) {
IP_NF_ASSERT(!timer_pending(&ct->timeout));
- ct->status |= IPS_CONFIRMED;
+ set_bit(IPS_CONFIRMED_BIT, &ct->status);
/* Timer relative to confirmation time, not original
setting time, otherwise we'd get timer wrap in
wierd delay cases. */
@@ -536,7 +536,7 @@ init_conntrack(const struct ip_conntrack_tuple *tuple,
static inline struct ip_conntrack *
resolve_normal_ct(struct sk_buff *skb,
struct ip_conntrack_protocol *proto,
- unsigned int *newstatus,
+ int *set_reply,
enum ip_conntrack_info *ctinfo)
{
struct ip_conntrack_tuple tuple;
@@ -565,7 +565,8 @@ resolve_normal_ct(struct sk_buff *skb,
}
*ctinfo = IP_CT_ESTABLISHED + IP_CT_IS_REPLY;
- *newstatus = (h->ctrack->status | IPS_SEEN_REPLY);
+ /* Please set reply bit if this packet OK */
+ *set_reply = 1;
} else {
/* Once we've had two way comms, always ESTABLISHED. */
if (h->ctrack->status & IPS_SEEN_REPLY) {
@@ -581,7 +582,7 @@ resolve_normal_ct(struct sk_buff *skb,
h->ctrack);
*ctinfo = IP_CT_NEW;
}
- *newstatus = h->ctrack->status;
+ *set_reply = 0;
}
skb->nfct = &h->ctrack->infos[*ctinfo];
return h->ctrack;
@@ -614,7 +615,7 @@ unsigned int ip_conntrack_in(unsigned int hooknum,
struct ip_conntrack *ct;
enum ip_conntrack_info ctinfo;
struct ip_conntrack_protocol *proto;
- unsigned int status;
+ int set_reply;
int ret;
/* FIXME: Do this right please. --RR */
@@ -654,10 +655,10 @@ unsigned int ip_conntrack_in(unsigned int hooknum,
&& icmp_error_track(*pskb, &ctinfo, hooknum))
return NF_ACCEPT;
- if (!(ct = resolve_normal_ct(*pskb, proto, &status, &ctinfo))) {
+ if (!(ct = resolve_normal_ct(*pskb, proto, &set_reply, &ctinfo)))
/* Not valid part of a connection */
return NF_ACCEPT;
- }
+
IP_NF_ASSERT((*pskb)->nfct);
ret = proto->packet(ct, (*pskb)->nh.iph, (*pskb)->len, ctinfo);
@@ -678,7 +679,8 @@ unsigned int ip_conntrack_in(unsigned int hooknum,
return NF_ACCEPT;
}
}
- ct->status = status;
+ if (set_reply)
+ set_bit(IPS_SEEN_REPLY_BIT, &ct->status);
return ret;
}
@@ -877,9 +879,12 @@ ip_ct_selective_cleanup(int (*kill)(const struct ip_conntrack *i, void *data),
mark confirmed so it gets cleaned as soon
as skb freed. */
WRITE_LOCK(&ip_conntrack_lock);
+ /* Lock protects race against another setting
+ of confirmed bit. set_bit isolates this
+ bit from the others. */
if (!(h->ctrack->status & IPS_CONFIRMED)) {
clean_from_lists(h->ctrack);
- h->ctrack->status |= IPS_CONFIRMED;
+ set_bit(IPS_CONFIRMED_BIT, &h->ctrack->status);
}
WRITE_UNLOCK(&ip_conntrack_lock);
}
diff --git a/net/unix/af_unix.c b/net/unix/af_unix.c
index 55dbc834c..926f64f2b 100644
--- a/net/unix/af_unix.c
+++ b/net/unix/af_unix.c
@@ -8,7 +8,7 @@
* as published by the Free Software Foundation; either version
* 2 of the License, or (at your option) any later version.
*
- * Version: $Id: af_unix.c,v 1.97 2000/06/09 07:35:49 davem Exp $
+ * Version: $Id: af_unix.c,v 1.98 2000/06/19 06:24:59 davem Exp $
*
* Fixes:
* Linus Torvalds : Assorted bug cures.