summaryrefslogtreecommitdiffstats
path: root/net/ipv4/inetpeer.c
diff options
context:
space:
mode:
authorDavid S. Miller <davem@davemloft.net>2011-01-27 22:52:16 +0100
committerDavid S. Miller <davem@davemloft.net>2011-01-27 22:52:16 +0100
commit144001bddcb4db62c2261f1d703d835851031577 (patch)
treee10cd1840542b2a6d4873ff8477314d91e453881 /net/ipv4/inetpeer.c
parentinetpeer: Add metrics storage to inetpeer entries. (diff)
downloadlinux-144001bddcb4db62c2261f1d703d835851031577.tar.xz
linux-144001bddcb4db62c2261f1d703d835851031577.zip
inetpeer: Mark metrics as "new" in fresh inetpeer entries.
Set the RTAX_LOCKED metric to INETPEER_METRICS_NEW (basically, all ones) on fresh inetpeer entries. This way code can determine if default metrics have been loaded in from a routing table entry already. Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/ipv4/inetpeer.c')
-rw-r--r--net/ipv4/inetpeer.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/net/ipv4/inetpeer.c b/net/ipv4/inetpeer.c
index a96e65674ac3..b6513b13d729 100644
--- a/net/ipv4/inetpeer.c
+++ b/net/ipv4/inetpeer.c
@@ -512,6 +512,7 @@ struct inet_peer *inet_getpeer(struct inetpeer_addr *daddr, int create)
atomic_set(&p->rid, 0);
atomic_set(&p->ip_id_count, secure_ip_id(daddr->a4));
p->tcp_ts_stamp = 0;
+ p->metrics[RTAX_LOCK-1] = INETPEER_METRICS_NEW;
INIT_LIST_HEAD(&p->unused);