Skip to content

Commit e7f5ae9

Browse files
committed
Make sure the address family for the local bind socket matches requested
stream AF.
1 parent 4909e7b commit e7f5ae9

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

src/commands/rpcpv1_ul.c

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -325,6 +325,12 @@ rtpp_command_ul_opts_parse(const struct rtpp_cfg *cfsp, struct rtpp_command *cmd
325325
CALL_SMETHOD(cmd->reply, deliver_error, ECODE_PARSE_15);
326326
goto err_undo_1;
327327
}
328+
if (tpf != ulop->pf) {
329+
RTPP_LOG(cmd->glog, RTPP_LOG_ERR, "mismatched protocol (%d local, %d session)",
330+
tpf, ulop->pf);
331+
CALL_SMETHOD(cmd->reply, deliver_error, ECODE_INVLARG_1);
332+
goto err_undo_1;
333+
}
328334
hostname = alloca(len + 1);
329335
memcpy(hostname, t, len);
330336
hostname[len] = '\0';

0 commit comments

Comments
 (0)