X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=lib%2Flacp.c;h=9eac4fe9f47ef5beba4766ec6b9e2960ed62cf17;hb=3d792b703f587f42475566b6e92f852d60e85ca2;hp=f7d5a82ff1839a7f7486ed1b8f31b84a135d9e7d;hpb=bde9f75de100e3801735bf69f605320f4db65cba;p=sliver-openvswitch.git diff --git a/lib/lacp.c b/lib/lacp.c index f7d5a82ff..9eac4fe9f 100644 --- a/lib/lacp.c +++ b/lib/lacp.c @@ -368,14 +368,16 @@ lacp_slave_unregister(struct lacp *lacp, const void *slave_) } /* This function should be called whenever the carrier status of 'slave_' has - * changed. */ + * changed. If 'lacp' is null, this function has no effect.*/ void lacp_slave_carrier_changed(const struct lacp *lacp, const void *slave_) { - struct slave *slave = slave_lookup(lacp, slave_); + if (lacp) { + struct slave *slave = slave_lookup(lacp, slave_); - if (slave->status == LACP_CURRENT || slave->lacp->active) { - slave_set_expired(slave); + if (slave->status == LACP_CURRENT || slave->lacp->active) { + slave_set_expired(slave); + } } }