diff options
author | brian <brian@FreeBSD.org> | 1999-12-20 20:30:02 +0000 |
---|---|---|
committer | brian <brian@FreeBSD.org> | 1999-12-20 20:30:02 +0000 |
commit | 4145fb0c1be9e8321d6d4e6f465453c2cc0aed50 (patch) | |
tree | fce823325831d2a7126e8d74c67c40f44d69b13c /usr.sbin/ppp/radius.c | |
parent | ff8174b1b3e9f7d40f556d9af0d8168f7b81cefa (diff) | |
download | FreeBSD-src-4145fb0c1be9e8321d6d4e6f465453c2cc0aed50.zip FreeBSD-src-4145fb0c1be9e8321d6d4e6f465453c2cc0aed50.tar.gz |
Notice and warn about unterminated quoted strings in commands.
The entire command is ignored if the syntax is invalid...
Diffstat (limited to 'usr.sbin/ppp/radius.c')
-rw-r--r-- | usr.sbin/ppp/radius.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/usr.sbin/ppp/radius.c b/usr.sbin/ppp/radius.c index 366baec..e46baee 100644 --- a/usr.sbin/ppp/radius.c +++ b/usr.sbin/ppp/radius.c @@ -176,7 +176,10 @@ radius_Process(struct radius *r, int got) dest.ipaddr.s_addr = dest.mask.s_addr = INADDR_ANY; dest.width = 0; argc = command_Interpret(nuke, strlen(nuke), argv); - if (argc < 2) + if (argc < 0) + log_Printf(LogWARN, "radius: %s: Syntax error\n", + argc == 1 ? argv[0] : "\"\""); + else if (argc < 2) log_Printf(LogWARN, "radius: %s: Invalid route\n", argc == 1 ? argv[0] : "\"\""); else if ((strcasecmp(argv[0], "default") != 0 && |