aboutsummaryrefslogtreecommitdiff
path: root/drivers/net/netdevsim/ipsec.c
AgeCommit message (Collapse)AuthorFilesLines
2020-03-15net: netdevsim: Use scnprintf() for avoiding potential buffer overflowTakashi Iwai1-15/+15
Since snprintf() returns the would-be-output size instead of the actual output size, the succeeding calls may go beyond the given buffer limit. Fix it by replacing with scnprintf(). Cc: "David S . Miller" <[email protected]> Cc: Jakub Kicinski <[email protected]> Cc: [email protected] Signed-off-by: Takashi Iwai <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2019-04-26netdevsim: move netdev creation/destruction to dev probeJiri Pirko1-1/+2
Remove the existing way to create netdevsim over rtnetlink and move the netdev creation/destruction to dev probe, so for every probed port, a netdevsim-netdev instance is created. Adjust selftests to work with new interface. Signed-off-by: Jiri Pirko <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2018-12-19drivers: net: netdevsim: use skb_sec_path helperFlorian Westphal1-3/+4
... so this won't have to be changed when skb->sp goes away. v2: no changes, preserve ack. Acked-by: Shannon Nelson <[email protected]> Signed-off-by: Florian Westphal <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2018-07-02netdevsim: fix sa_idx out of bounds checkColin Ian King1-1/+1
Currently if sa_idx is equal to NSIM_IPSEC_MAX_SA_COUNT then an out-of-bounds read on ipsec->sa will occur. Fix the incorrect bounds check by using >= rather than >. Detected by CoverityScan, CID#1470226 ("Out-of-bounds-read") Fixes: 7699353da875 ("netdevsim: add ipsec offload testing") Signed-off-by: Colin Ian King <[email protected]> Acked-by: Shannon Nelson <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2018-06-28netdevsim: add ipsec offload testingShannon Nelson1-0/+297
Implement the IPsec/XFRM offload API for testing. Signed-off-by: Shannon Nelson <[email protected]> Reviewed-by: Jakub Kicinski <[email protected]> Signed-off-by: David S. Miller <[email protected]>