Mercurial > hg > nginx-quic
comparison auto/unix @ 6980:dbb0c854e308
Set UDP datagram source address (ticket #1239).
Previously, the source IP address of a response UDP datagram could differ from
the original datagram destination address. This could happen if the server UDP
socket is bound to a wildcard address and the network interface chosen to output
the response packet has a different default address than the destination address
of the original packet. For example, if two addresses from the same network are
configured on an interface.
Now source address is set explicitly if a response is sent for a server UDP
socket bound to a wildcard address.
author | Roman Arutyunyan <arut@nginx.com> |
---|---|
date | Tue, 11 Apr 2017 16:41:53 +0300 |
parents | a6d116645c51 |
children | c1524829af3d |
comparison
equal
deleted
inserted
replaced
6979:ef935cd7ed8d | 6980:dbb0c854e308 |
---|---|
389 ngx_feature_incs="#include <sys/socket.h> | 389 ngx_feature_incs="#include <sys/socket.h> |
390 #include <netinet/in.h>" | 390 #include <netinet/in.h>" |
391 ngx_feature_path= | 391 ngx_feature_path= |
392 ngx_feature_libs= | 392 ngx_feature_libs= |
393 ngx_feature_test="setsockopt(0, IPPROTO_IP, IP_RECVDSTADDR, NULL, 0)" | 393 ngx_feature_test="setsockopt(0, IPPROTO_IP, IP_RECVDSTADDR, NULL, 0)" |
394 . auto/feature | |
395 | |
396 | |
397 # BSD way to set IPv4 datagram source address | |
398 | |
399 ngx_feature="IP_SENDSRCADDR" | |
400 ngx_feature_name="NGX_HAVE_IP_SENDSRCADDR" | |
401 ngx_feature_run=no | |
402 ngx_feature_incs="#include <sys/socket.h> | |
403 #include <netinet/in.h>" | |
404 ngx_feature_path= | |
405 ngx_feature_libs= | |
406 ngx_feature_test="setsockopt(0, IPPROTO_IP, IP_SENDSRCADDR, NULL, 0)" | |
394 . auto/feature | 407 . auto/feature |
395 | 408 |
396 | 409 |
397 # Linux way to get IPv4 datagram destination address | 410 # Linux way to get IPv4 datagram destination address |
398 | 411 |