X-Git-Url: https://gerrit.fd.io/r/gitweb?a=blobdiff_plain;f=vnet%2Fvnet%2Flldp%2Flldp_node.c;h=acaa5e10e36ab0cf0a3eb1a7518aff5408484769;hb=025943b9d0629e69343e28a478b3fa2e6d23fa16;hp=2eb27e0634ea89c100db735af4fc7aeffc6bead5;hpb=de4582b4c25f30412a8eab5f7741e577a1387fec;p=vpp.git diff --git a/vnet/vnet/lldp/lldp_node.c b/vnet/vnet/lldp/lldp_node.c index 2eb27e0634e..acaa5e10e36 100644 --- a/vnet/vnet/lldp/lldp_node.c +++ b/vnet/vnet/lldp/lldp_node.c @@ -79,7 +79,7 @@ lldp_node_fn (vlib_main_t * vm, vlib_node_runtime_t * node, error0 = lldp_input (vm, b0, bi0); b0->error = node->errors[error0]; - /* If this pkt is traced, snapshoot the data */ + /* If this pkt is traced, snapshot the data */ if (b0->flags & VLIB_BUFFER_IS_TRACED) { int len; @@ -241,6 +241,16 @@ VLIB_REGISTER_NODE(lldp_process_node, static) = { void lldp_schedule_intf (lldp_main_t * lm, lldp_intf_t * n) { + const int idx = n - lm->intfs; + u32 v; + vec_foreach_index (v, lm->intfs_timeouts) + { + if (lm->intfs_timeouts[v] == idx) + { + /* already scheduled */ + return; + } + } n->last_sent = 0; /* ensure that a packet is sent out immediately */ /* put the interface at the current position in the timeouts - it * will timeout immediately */