Skip to content

Commit 5e11623

Browse files
committed
python: stream: Fix unlink attempt for ptcp IP address.
While creating passive TCP connections the library stores part of the connection method as a bind path regardless of it being a path. And then it may attempt to unlink it on close: fatal-signal | WARN | could not unlink "27.0.0.1:58866" (No such file or directory) Unlinking only makes sense for unix sockets, not TCP, so the variable should only be initialized for "punix" case. It's not a big problem since those files are unlikely to exist, but it generates strange warnings in the logs. Fixes: af35823 ("python: Add TCP passive-mode to IDL.") Acked-by: Eelco Chaudron <echaudro@redhat.com> Signed-off-by: Ilya Maximets <i.maximets@ovn.org>
1 parent 0a8f6be commit 5e11623

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

python/ovs/stream.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -585,9 +585,9 @@ def open(name):
585585
if not PassiveStream.is_valid_name(name):
586586
return errno.EAFNOSUPPORT, None
587587

588-
bind_path = name[6:]
588+
bind_path = None
589589
if name.startswith("punix:"):
590-
bind_path = ovs.util.abs_file_name(ovs.dirs.RUNDIR, bind_path)
590+
bind_path = ovs.util.abs_file_name(ovs.dirs.RUNDIR, name[6:])
591591
if sys.platform != 'win32':
592592
error, sock = ovs.socket_util.make_unix_socket(
593593
socket.SOCK_STREAM, True, bind_path, None)

0 commit comments

Comments
 (0)