Commit 4c0f26eb authored by Adam Wujek's avatar Adam Wujek 💬

[BUG: 1750] userspace/wrsw_rtud: allow rtu_stat to change type of MAC entry (static/dynamic)

+fix typo
Signed-off-by: Adam Wujek's avatarAdam Wujek <adam.wujek@cern.ch>
parent 4e9cb9d9
......@@ -296,9 +296,13 @@ int rtu_fd_create_entry(uint8_t mac[ETH_ALEN], uint16_t vid, uint32_t port_mask,
//it means that the port moved, so we override the existing mask...
mask_src = 0xFFFFFFFF; //ML: filtering on ingress is optional according to 802.1Q-2012
//by default it should not happen. TODO: add optional config
if ((ent->port_mask_dst != mask_dst) || (ent->port_mask_src != mask_src)) { // something new
if ((ent->port_mask_dst != mask_dst)
|| (ent->port_mask_src != mask_src)
|| (ent->dynamic != dynamic)) {
/* new entry */
ent->port_mask_dst = mask_dst;
ent->port_mask_src = mask_src;
ent->dynamic = dynamic;
/* ML: update time always when updating
* the entry */
ent->last_access_t = get_monotonic_sec();
......
......@@ -84,7 +84,7 @@ void usage(char *name)
"\t-r aging resolution (in sec). 20 sec by default\n"
"\t-t aging time (10 to 10000 sec). 300 sec by default.\n"
"\t-q decrease verbosity\n"
"\t-v dncrease verbosity\n",
"\t-v increase verbosity\n",
name);
exit(1);
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment