git.droids-corp.org
/
dpdk.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
| inline |
side by side
net/sfc: check ID overflow in action port ID
[dpdk.git]
/
drivers
/
net
/
sfc
/
sfc_mae.c
diff --git
a/drivers/net/sfc/sfc_mae.c
b/drivers/net/sfc/sfc_mae.c
index
33bff27
..
2ea2d63
100644
(file)
--- a/
drivers/net/sfc/sfc_mae.c
+++ b/
drivers/net/sfc/sfc_mae.c
@@
-2653,6
+2653,9
@@
sfc_mae_rule_parse_action_port_id(struct sfc_adapter *sa,
uint16_t port_id;
int rc;
+ if (conf->id > UINT16_MAX)
+ return EOVERFLOW;
+
port_id = (conf->original != 0) ? sas->port_id : conf->id;
rc = sfc_mae_switch_port_by_ethdev(mae->switch_domain_id,