aboutsummaryrefslogtreecommitdiff
path: root/lib/learning-switch.c
diff options
context:
space:
mode:
authorBen Pfaff <blp@nicira.com>2012-02-01 15:04:51 -0800
committerBen Pfaff <blp@nicira.com>2012-02-01 15:12:25 -0800
commit231ee9b7442e515bc654dee37806ee957f74afd7 (patch)
tree451a4774c7f35178114411556062c143cdfbaadd /lib/learning-switch.c
parent349dba3bcbe2bc447c7b0999427df6c748e35c09 (diff)
vswitchd: Make the MAC entry aging time configurable.
NICS-11. Signed-off-by: Ben Pfaff <blp@nicira.com>
Diffstat (limited to 'lib/learning-switch.c')
-rw-r--r--lib/learning-switch.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/lib/learning-switch.c b/lib/learning-switch.c
index ecc5509e..3118cd34 100644
--- a/lib/learning-switch.c
+++ b/lib/learning-switch.c
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2008, 2009, 2010, 2011 Nicira Networks.
+ * Copyright (c) 2008, 2009, 2010, 2011, 2012 Nicira Networks.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -96,7 +96,9 @@ lswitch_create(struct rconn *rconn, const struct lswitch_config *cfg)
sw->max_idle = cfg->max_idle;
sw->datapath_id = 0;
sw->last_features_request = time_now() - 1;
- sw->ml = cfg->mode == LSW_LEARN ? mac_learning_create() : NULL;
+ sw->ml = (cfg->mode == LSW_LEARN
+ ? mac_learning_create(MAC_ENTRY_DEFAULT_IDLE_TIME)
+ : NULL);
sw->action_normal = cfg->mode == LSW_NORMAL;
flow_wildcards_init_exact(&sw->wc);