diff options
| -rw-r--r-- | lib/keychain.c | 2 | ||||
| -rw-r--r-- | lib/sockopt.c | 2 | ||||
| -rw-r--r-- | ripd/ripd.c | 2 | ||||
| -rwxr-xr-x | tools/frr | 6 |
4 files changed, 8 insertions, 4 deletions
diff --git a/lib/keychain.c b/lib/keychain.c index c3e1a6d3c4..494f6f6430 100644 --- a/lib/keychain.c +++ b/lib/keychain.c @@ -172,7 +172,7 @@ struct key *key_match_for_accept(const struct keychain *keychain, if (key->accept.start == 0 || (key->accept.start <= now && (key->accept.end >= now || key->accept.end == -1))) - if (strncmp(key->string, auth_str, 16) == 0) + if (key->string && (strncmp(key->string, auth_str, 16) == 0)) return key; } return NULL; diff --git a/lib/sockopt.c b/lib/sockopt.c index 815be86c2e..e979bef174 100644 --- a/lib/sockopt.c +++ b/lib/sockopt.c @@ -75,7 +75,7 @@ static void *getsockopt_cmsg_data(struct msghdr *msgh, int level, int type) for (cmsg = ZCMSG_FIRSTHDR(msgh); cmsg != NULL; cmsg = CMSG_NXTHDR(msgh, cmsg)) - if (cmsg->cmsg_level == level && cmsg->cmsg_type) + if (cmsg->cmsg_level == level && cmsg->cmsg_type == type) return (ptr = CMSG_DATA(cmsg)); return NULL; diff --git a/ripd/ripd.c b/ripd/ripd.c index fa1188d625..f7d6d3d929 100644 --- a/ripd/ripd.c +++ b/ripd/ripd.c @@ -828,7 +828,7 @@ static int rip_auth_simple_password(struct rte *rte, struct sockaddr_in *from, struct key *key; keychain = keychain_lookup(ri->key_chain); - if (keychain == NULL) + if (keychain == NULL || keychain->key == NULL) return 0; key = key_match_for_accept(keychain, auth_str); @@ -574,7 +574,11 @@ case "$1" in reload) # Just apply the commands that have changed, no restart necessary - [ ! -x "$RELOAD_SCRIPT" ] && echo "frr-reload script not available" && exit 0 + if [ ! -x "$RELOAD_SCRIPT" ]; then + echo "Please install frr-pythontools package. Required for reload" + exit 0 + fi + NEW_CONFIG_FILE="${2:-$C_PATH/frr.conf}" [ ! -r $NEW_CONFIG_FILE ] && echo "Unable to read new configuration file $NEW_CONFIG_FILE" && exit 1 echo "Applying only incremental changes to running configuration from frr.conf" |
