X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=lib%2Flearning-switch.c;fp=lib%2Flearning-switch.c;h=5b1996c66dbacf2a07db95f5318c3a4fe1f907c3;hb=1f86162ac8969612ae19e1e1e07290ab53f8d936;hp=ca970540e0ff8e38f97e4e434b2a11cfaf4e2774;hpb=5bba4697868056f96aec322a35c5e60e5792cf1a;p=sliver-openvswitch.git diff --git a/lib/learning-switch.c b/lib/learning-switch.c index ca970540e..5b1996c66 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);