1
0
Fork 0
mirror of https://repo.or.cz/socat.git synced 2025-07-10 06:06:33 +00:00

Fixed IP-SENDTO with option pf with protocol name

This commit is contained in:
Gerhard Rieger 2024-07-26 09:48:17 +02:00
parent 50b6301bda
commit 0cfe39a413
7 changed files with 75 additions and 15 deletions

View file

@ -56,7 +56,7 @@ int _xioopen_foxec(int xioflags, /* XIO_RDONLY etc. */
struct opt *popts = NULL; /* parent options */
struct opt *copts; /* child options */
int numleft;
int d, sv[2], rdpip[2], wrpip[2];
int sv[2], rdpip[2], wrpip[2];
int rw = (xioflags & XIO_ACCMODE);
bool usepipes = false;
#if HAVE_PTY
@ -355,10 +355,11 @@ int _xioopen_foxec(int xioflags, /* XIO_RDONLY etc. */
/* end withfork, use_pipes */
} else {
/* withfork, socketpair */
int pf;
d = AF_UNIX;
retropt_int(opts, OPT_PROTOCOL_FAMILY, &d);
result = xiosocketpair(opts, d, SOCK_STREAM, 0, sv);
pf = AF_UNIX;
retropt_socket_pf(opts, &pf);
result = xiosocketpair(opts, pf, SOCK_STREAM, 0, sv);
if (result < 0) {
return -1;
}