diff options
| author | Quentin Young <qlyoung@users.noreply.github.com> | 2021-07-05 04:13:20 +0000 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2021-07-05 04:13:20 +0000 |
| commit | 71bae95e4aa78a5f269d7d26171911169e0810b1 (patch) | |
| tree | 36a3633d7eddd2d549366a5f8883d7868bacea8a /lib/command.c | |
| parent | b09ca18c3f453356d7bd381701341f67000845b0 (diff) | |
| parent | cd3c3a98e279326a0fc69a0f0d7620abdf8b404f (diff) | |
Merge pull request #8888 from dlqs/lua-call
Diffstat (limited to 'lib/command.c')
| -rw-r--r-- | lib/command.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/lib/command.c b/lib/command.c index 560d4a09f8..9dac60599c 100644 --- a/lib/command.c +++ b/lib/command.c @@ -2428,14 +2428,16 @@ DEFUN(script, struct prefix p; (void)str2prefix("1.2.3.4/24", &p); - struct frrscript *fs = frrscript_load(argv[1]->arg, NULL); if (fs == NULL) { vty_out(vty, "Script '/etc/frr/scripts/%s.lua' not found\n", argv[1]->arg); } else { - int ret = frrscript_call(fs, NULL); + int ret = frrscript_call(fs, ("p", &p)); + char buf[40]; + prefix2str(&p, buf, sizeof(buf)); + vty_out(vty, "p: %s\n", buf); vty_out(vty, "Script result: %d\n", ret); } |
