aboutsummaryrefslogtreecommitdiffstats
path: root/erts/emulator/beam/erl_bif_ddll.c
diff options
context:
space:
mode:
authorRickard Green <[email protected]>2014-03-20 19:01:11 +0100
committerRickard Green <[email protected]>2014-03-21 13:24:40 +0100
commitbf3222f10edbd1f6a5186c8fb35c29900ad0665f (patch)
treefa761309c15de7996634a9474919c9621c126336 /erts/emulator/beam/erl_bif_ddll.c
parent3c06b5b3cdde72453d97910889e38e91c1dd4870 (diff)
downloadotp-bf3222f10edbd1f6a5186c8fb35c29900ad0665f.tar.gz
otp-bf3222f10edbd1f6a5186c8fb35c29900ad0665f.tar.bz2
otp-bf3222f10edbd1f6a5186c8fb35c29900ad0665f.zip
Introduce minimum allowed major driver and nif versions on load
Diffstat (limited to 'erts/emulator/beam/erl_bif_ddll.c')
-rw-r--r--erts/emulator/beam/erl_bif_ddll.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/erts/emulator/beam/erl_bif_ddll.c b/erts/emulator/beam/erl_bif_ddll.c
index 1728b200f7..56cd2ba04f 100644
--- a/erts/emulator/beam/erl_bif_ddll.c
+++ b/erts/emulator/beam/erl_bif_ddll.c
@@ -1548,8 +1548,10 @@ static int do_load_driver_entry(DE_Handle *dh, char *path, char *name)
switch (dp->extended_marker) {
case ERL_DRV_EXTENDED_MARKER:
- if (ERL_DRV_EXTENDED_MAJOR_VERSION != dp->major_version
- || ERL_DRV_EXTENDED_MINOR_VERSION < dp->minor_version) {
+ if (dp->major_version < ERL_DRV_MIN_REQUIRED_MAJOR_VERSION_ON_LOAD
+ || (ERL_DRV_EXTENDED_MAJOR_VERSION < dp->major_version
+ || (ERL_DRV_EXTENDED_MAJOR_VERSION == dp->major_version
+ && ERL_DRV_EXTENDED_MINOR_VERSION < dp->minor_version))) {
/* Incompatible driver version */
res = ERL_DE_LOAD_ERROR_INCORRECT_VERSION;
goto error;