X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=lib%2Flearning-switch.c;h=3118cd34357ff68814eb87e6c3d946731aa38055;hb=231ee9b7442e515bc654dee37806ee957f74afd7;hp=ecc5509e60ad63be995f455c209935421c6342a1;hpb=349dba3bcbe2bc447c7b0999427df6c748e35c09;p=sliver-openvswitch.git diff --git a/lib/learning-switch.c b/lib/learning-switch.c index ecc5509e6..3118cd343 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);