-
Notifications
You must be signed in to change notification settings - Fork 67
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Align fork with HPU upstream code #465
Conversation
…-project#6143) Signed-off-by: yuwenzho <[email protected]> Signed-off-by: Chendi.Xue <[email protected]> Signed-off-by: Bob Zhu <[email protected]> Signed-off-by: zehao-intel <[email protected]> Signed-off-by: Konrad Zawora <[email protected]> Co-authored-by: Kunshang Ji <[email protected]> Co-authored-by: Sanju C Sudhakaran <[email protected]> Co-authored-by: Michal Adamczyk <[email protected]> Co-authored-by: Marceli Fylcek <[email protected]> Co-authored-by: Himangshu Lahkar <[email protected]> Co-authored-by: Vivek Goel <[email protected]> Co-authored-by: yuwenzho <[email protected]> Co-authored-by: Dominika Olszewska <[email protected]> Co-authored-by: barak goldberg <[email protected]> Co-authored-by: Michal Szutenberg <[email protected]> Co-authored-by: Jan Kaniecki <[email protected]> Co-authored-by: Agata Dobrzyniewicz <[email protected]> Co-authored-by: Krzysztof Wisniewski <[email protected]> Co-authored-by: Dudi Lester <[email protected]> Co-authored-by: Ilia Taraban <[email protected]> Co-authored-by: Chendi.Xue <[email protected]> Co-authored-by: Michał Kuligowski <[email protected]> Co-authored-by: Jakub Maksymczuk <[email protected]> Co-authored-by: Tomasz Zielinski <[email protected]> Co-authored-by: Sun Choi <[email protected]> Co-authored-by: Iryna Boiko <[email protected]> Co-authored-by: Bob Zhu <[email protected]> Co-authored-by: hlin99 <[email protected]> Co-authored-by: Zehao Huang <[email protected]> Co-authored-by: Andrzej Kotłowski <[email protected]> Co-authored-by: Yan Tomsinsky <[email protected]> Co-authored-by: Nir David <[email protected]> Co-authored-by: Yu-Zhou <[email protected]> Co-authored-by: Ruheena Suhani Shaik <[email protected]> Co-authored-by: Karol Damaszke <[email protected]> Co-authored-by: Marcin Swiniarski <[email protected]> Co-authored-by: Woosuk Kwon <[email protected]> Co-authored-by: Jacek Czaja <[email protected]> Co-authored-by: Jacek Czaja <[email protected]> Co-authored-by: Yuan <[email protected]>
Signed-off-by: Woosuk Kwon <[email protected]>
@@ -569,7 +569,8 @@ | |||
# This avoids race conditions with ray. | |||
# see https://github.com/vllm-project/vllm/issues/8204 | |||
sock = socket.socket(socket.AF_INET, socket.SOCK_STREAM) | |||
sock.bind(("", args.port)) | |||
sock.bind((args.host or "", args.port)) |
Check warning
Code scanning / CodeQL
Binding a socket to all network interfaces Medium
Show autofix suggestion
Hide autofix suggestion
Copilot Autofix AI 3 months ago
To fix the problem, we need to bind the socket to a specific network interface instead of all interfaces. This can be achieved by modifying the sock.bind
call to use a specific IP address. The best way to do this without changing existing functionality is to use the IP address provided in the args.host
parameter. If args.host
is not provided, we should raise an error or use a default secure IP address.
- Modify the
sock.bind
call on line 572 to useargs.host
directly. - Ensure that
args.host
is not an empty string or0.0.0.0
. If it is, raise an error or use a default secure IP address.
-
Copy modified lines R572-R574
@@ -571,3 +571,5 @@ | ||
sock = socket.socket(socket.AF_INET, socket.SOCK_STREAM) | ||
sock.bind((args.host or "", args.port)) | ||
if not args.host or args.host in ["", "0.0.0.0"]: | ||
raise ValueError("Invalid host address. Please provide a specific IP address.") | ||
sock.bind((args.host, args.port)) | ||
sock.setsockopt(socket.SOL_SOCKET, socket.SO_REUSEADDR, 1) |
15541b2
to
843ae37
Compare
vllm-project#6143 got merged, but it's based on an older revision of HPU components. This PR aligns the two.